| OLD | NEW |
| (Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../../http/tests/inspector/elements-test.js"></script> |
| 5 <script src="accessibility-pane-test.js"></script> |
| 6 <script> |
| 7 |
| 8 function test() |
| 9 { |
| 10 InspectorTest.showAccessibilityView().then((view) => { |
| 11 InspectorTest.selectNodeAndWaitForAccessibility("inspected") |
| 12 .then(() => { |
| 13 editAriaChecked(); }); |
| 14 }); |
| 15 |
| 16 function editAriaChecked() |
| 17 { |
| 18 InspectorTest.addResult("=== Before attribute modification ==="); |
| 19 InspectorTest.dumpSelectedElementAccessibilityNode(); |
| 20 var treeElement = InspectorTest.findARIAAttributeTreeElement("aria-check
ed"); |
| 21 treeElement._startEditing(); |
| 22 treeElement._prompt._element.textContent = "false"; |
| 23 InspectorTest.waitForAccessibilityNodeUpdate().then(() => { editRole();
}); |
| 24 treeElement._prompt._element.dispatchEvent(InspectorTest.createKeyEvent(
"Enter")); |
| 25 } |
| 26 |
| 27 function editRole() |
| 28 { |
| 29 InspectorTest.addResult("=== After attribute modification ==="); |
| 30 InspectorTest.dumpSelectedElementAccessibilityNode(); |
| 31 var treeElement = InspectorTest.findARIAAttributeTreeElement("role"); |
| 32 treeElement._startEditing(); |
| 33 treeElement._prompt._element.textContent = "radio"; |
| 34 InspectorTest.waitForAccessibilityNodeUpdate().then(() => { postRoleChan
ge(); }); |
| 35 treeElement._prompt._element.dispatchEvent(InspectorTest.createKeyEvent(
"Enter")); |
| 36 } |
| 37 |
| 38 function postRoleChange() |
| 39 { |
| 40 InspectorTest.addResult("=== After role modification ==="); |
| 41 InspectorTest.dumpSelectedElementAccessibilityNode(); |
| 42 InspectorTest.completeTest(); |
| 43 } |
| 44 } |
| 45 |
| 46 </script> |
| 47 </head> |
| 48 |
| 49 <body onload="runTest()"> |
| 50 <p> |
| 51 Tests that writing an ARIA attribute causes the accessibility node to be updated
. |
| 52 </p> |
| 53 |
| 54 <button id="inspected" role="checkbox" aria-checked="true">ARIA checkbox</button
> |
| 55 |
| 56 </body> |
| 57 </html> |
| OLD | NEW |