Chromium Code Reviews| 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.showAccessibilityWidget(); | |
| 11 InspectorTest.selectNodeAndWaitForAccessibility("inspected", editAriaChecked ); | |
| 12 | |
| 13 function editAriaChecked() | |
| 14 { | |
| 15 InspectorTest.addResult("=== Before attribute modification ==="); | |
| 16 InspectorTest.dumpSelectedElementAccessibilityNode(); | |
| 17 var treeElement = InspectorTest.findARIAAttributeTreeElement("aria-check ed"); | |
| 18 | |
| 19 treeElement._startEditing(); | |
| 20 treeElement._prompt._element.textContent = "false"; | |
| 21 InspectorTest.waitForAccessibilityNodeUpdate(editRole); | |
| 22 treeElement._prompt._element.dispatchEvent(InspectorTest.createKeyEvent( "Enter")); | |
| 23 } | |
| 24 | |
| 25 function editRole() | |
| 26 { | |
| 27 InspectorTest.addResult("=== After attribute modification ==="); | |
| 28 InspectorTest.dumpSelectedElementAccessibilityNode(); | |
| 29 var treeElement = InspectorTest.findARIAAttributeTreeElement("role"); | |
| 30 treeElement._startEditing(); | |
| 31 treeElement._prompt._element.textContent = "radio"; | |
| 32 InspectorTest.waitForAccessibilityNodeUpdate(postRoleChange); | |
| 33 treeElement._prompt._element.dispatchEvent(InspectorTest.createKeyEvent( "Enter")); | |
| 34 } | |
| 35 | |
| 36 function postRoleChange() | |
| 37 { | |
| 38 InspectorTest.addResult("=== After role modification ==="); | |
| 39 InspectorTest.dumpSelectedElementAccessibilityNode(); | |
| 40 InspectorTest.completeTest(); | |
| 41 } | |
| 42 } | |
| 43 | |
| 44 </script> | |
| 45 </head> | |
| 46 | |
| 47 <body onload="runTest()"> | |
| 48 <p> | |
| 49 Tests that writing an ARIA attribute causes the accessibility node to be updated . | |
|
dgozman
2016/07/22 16:44:29
Expectations file is missing in the patch.
| |
| 50 </p> | |
| 51 | |
| 52 <button id="inspected" role="checkbox" aria-checked="true">ARIA checkbox</button > | |
| 53 | |
| 54 </body> | |
| 55 </html> | |
| OLD | NEW |