blob: 55a35307e44f1d4fe4db027aea0fe1eb6faf2f4a [file] [log] [blame]
Tests for the injected WebInspectorAudit.Accessibility functions.
== Running test suite: Audit.run.Accessibility
-- Running test case: Audit.run.Accessibility.getElementsByComputedRole.FakeRole
Audit setup...
Audit run `WebInspectorAudit.Accessibility.getElementsByComputedRole("FakeRole")`...
Result: []
Audit teardown...
-- Running test case: Audit.run.Accessibility.getElementsByComputedRole.FakeRole.parent
Audit setup...
Audit run `WebInspectorAudit.Accessibility.getElementsByComputedRole("FakeRole", document.querySelector("#parent"))`...
Result: []
Audit teardown...
-- Running test case: Audit.run.Accessibility.getElementsByComputedRole.tree
Audit setup...
Audit run `WebInspectorAudit.Accessibility.getElementsByComputedRole("tree")`...
Result: ["#parent"]
Audit teardown...
-- Running test case: Audit.run.Accessibility.getElementsByComputedRole.tree.parent
Audit setup...
Audit run `WebInspectorAudit.Accessibility.getElementsByComputedRole("tree", document.querySelector("#parent"))`...
Result: []
Audit teardown...
-- Running test case: Audit.run.Accessibility.getElementsByComputedRole.button
Audit setup...
Audit run `WebInspectorAudit.Accessibility.getElementsByComputedRole("button")`...
Result: ["#button","#link"]
Audit teardown...
-- Running test case: Audit.run.Accessibility.getElementsByComputedRole.button.parent
Audit setup...
Audit run `WebInspectorAudit.Accessibility.getElementsByComputedRole("button", document.querySelector("#parent"))`...
Result: []
Audit teardown...
-- Running test case: Audit.run.Accessibility.getActiveDescendant.parent
Audit setup...
Audit run `WebInspectorAudit.Accessibility.getActiveDescendant(document.querySelector("#parent"))`...
Result: #child
Audit teardown...
-- Running test case: Audit.run.Accessibility.getActiveDescendant.child
Audit setup...
Audit run `WebInspectorAudit.Accessibility.getActiveDescendant(document.querySelector("#child"))`...
Result: null
Audit teardown...
-- Running test case: Audit.run.Accessibility.getChildNodes.parent
Audit setup...
Audit run `WebInspectorAudit.Accessibility.getChildNodes(document.querySelector("#parent"))`...
Result: ["#child"]
Audit teardown...
-- Running test case: Audit.run.Accessibility.getChildNodes.child
Audit setup...
Audit run `WebInspectorAudit.Accessibility.getChildNodes(document.querySelector("#child"))`...
Result: []
Audit teardown...
-- Running test case: Audit.run.Accessibility.getComputedProperties.parent
Audit setup...
Audit run `WebInspectorAudit.Accessibility.getComputedProperties(document.querySelector("#parent"))`...
Result: {
"busy": false,
"currentState": "false",
"disabled": false,
"headingLevel": 0,
"hidden": false,
"hierarchicalLevel": 0,
"ignored": false,
"ignoredByDefault": false,
"invalidStatus": "false",
"isPopUpButton": false,
"pressed": false,
"role": "tree",
"selected": false
}
Audit teardown...
-- Running test case: Audit.run.Accessibility.getComputedProperties.child
Audit setup...
Audit run `WebInspectorAudit.Accessibility.getComputedProperties(document.querySelector("#child"))`...
Result: {
"busy": false,
"currentState": "false",
"disabled": false,
"headingLevel": 0,
"hidden": false,
"hierarchicalLevel": 1,
"ignored": false,
"ignoredByDefault": false,
"invalidStatus": "false",
"isPopUpButton": false,
"pressed": false,
"role": "treeitem",
"selected": true
}
Audit teardown...
-- Running test case: Audit.run.Accessibility.getControlledNodes.parent
Audit setup...
Audit run `WebInspectorAudit.Accessibility.getControlledNodes(document.querySelector("#parent"))`...
Result: ["#child"]
Audit teardown...
-- Running test case: Audit.run.Accessibility.getControlledNodes.child
Audit setup...
Audit run `WebInspectorAudit.Accessibility.getControlledNodes(document.querySelector("#child"))`...
Result: []
Audit teardown...
-- Running test case: Audit.run.Accessibility.getFlowedNodes.parent
Audit setup...
Audit run `WebInspectorAudit.Accessibility.getFlowedNodes(document.querySelector("#parent"))`...
Result: ["#child"]
Audit teardown...
-- Running test case: Audit.run.Accessibility.getFlowedNodes.child
Audit setup...
Audit run `WebInspectorAudit.Accessibility.getFlowedNodes(document.querySelector("#child"))`...
Result: []
Audit teardown...
-- Running test case: Audit.run.Accessibility.getMouseEventNode.parent
Audit setup...
Audit run `WebInspectorAudit.Accessibility.getMouseEventNode(document.querySelector("#parent"))`...
Result: #parent
Audit teardown...
-- Running test case: Audit.run.Accessibility.getMouseEventNode.child
Audit setup...
Audit run `WebInspectorAudit.Accessibility.getMouseEventNode(document.querySelector("#child"))`...
Result: #parent
Audit teardown...
-- Running test case: Audit.run.Accessibility.getOwnedNodes.parent
Audit setup...
Audit run `WebInspectorAudit.Accessibility.getOwnedNodes(document.querySelector("#parent"))`...
Result: ["#child"]
Audit teardown...
-- Running test case: Audit.run.Accessibility.getOwnedNodes.child
Audit setup...
Audit run `WebInspectorAudit.Accessibility.getOwnedNodes(document.querySelector("#child"))`...
Result: null
Audit teardown...
-- Running test case: Audit.run.Accessibility.getParentNode.parent
Audit setup...
Audit run `WebInspectorAudit.Accessibility.getParentNode(document.querySelector("#parent"))`...
Result: <document>
Audit teardown...
-- Running test case: Audit.run.Accessibility.getParentNode.child
Audit setup...
Audit run `WebInspectorAudit.Accessibility.getParentNode(document.querySelector("#child"))`...
Result: #parent
Audit teardown...
-- Running test case: Audit.run.Accessibility.getSelectedChildNodes.parent
Audit setup...
Audit run `WebInspectorAudit.Accessibility.getSelectedChildNodes(document.querySelector("#parent"))`...
Result: ["#child"]
Audit teardown...
-- Running test case: Audit.run.Accessibility.getSelectedChildNodes.child
Audit setup...
Audit run `WebInspectorAudit.Accessibility.getSelectedChildNodes(document.querySelector("#child"))`...
Result: []
Audit teardown...
-- Running test case: Audit.run.Accessibility.InvalidCopiedFunctionCall
Audit setup...
Copying WebInspectorAudit to window...
Audit teardown...
Testing copied getElementsByComputedRole...
PASS: Should produce an exception.
Error: NotAllowedError: Cannot be called outside of a Web Inspector Audit
Testing copied getActiveDescendant...
PASS: Should produce an exception.
Error: NotAllowedError: Cannot be called outside of a Web Inspector Audit
Testing copied getChildNodes...
PASS: Should produce an exception.
Error: NotAllowedError: Cannot be called outside of a Web Inspector Audit
Testing copied getComputedProperties...
PASS: Should produce an exception.
Error: NotAllowedError: Cannot be called outside of a Web Inspector Audit
Testing copied getControlledNodes...
PASS: Should produce an exception.
Error: NotAllowedError: Cannot be called outside of a Web Inspector Audit
Testing copied getFlowedNodes...
PASS: Should produce an exception.
Error: NotAllowedError: Cannot be called outside of a Web Inspector Audit
Testing copied getMouseEventNode...
PASS: Should produce an exception.
Error: NotAllowedError: Cannot be called outside of a Web Inspector Audit
Testing copied getOwnedNodes...
PASS: Should produce an exception.
Error: NotAllowedError: Cannot be called outside of a Web Inspector Audit
Testing copied getParentNode...
PASS: Should produce an exception.
Error: NotAllowedError: Cannot be called outside of a Web Inspector Audit
Testing copied getSelectedChildNodes...
PASS: Should produce an exception.
Error: NotAllowedError: Cannot be called outside of a Web Inspector Audit