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() | |
|
lushnikov
2016/08/26 23:32:20
You would also want to remove -expected.txt for th
aboxhall
2016/08/26 23:43:58
Oh, facepalm. This test is needed, but didn't need
| |
| 9 { | |
| 10 WebInspector.viewManager.showView("accessibility.view") | |
| 11 .then(() => InspectorTest.selectNodeAndWaitForAccessibility("inspected") ) | |
| 12 .then(editAriaChecked); | |
| 13 | |
| 14 function editAriaChecked() | |
| 15 { | |
| 16 InspectorTest.addResult("=== Before attribute modification ==="); | |
| 17 InspectorTest.dumpSelectedElementAccessibilityNode(); | |
| 18 var treeElement = InspectorTest.findARIAAttributeTreeElement("aria-check ed"); | |
| 19 treeElement._startEditing(); | |
| 20 treeElement._prompt._element.textContent = "false"; | |
| 21 treeElement._prompt._element.dispatchEvent(InspectorTest.createKeyEvent( "Enter")); | |
| 22 self.runtime.sharedInstance(WebInspector.AccessibilitySidebarView).doUpd ate().then(() => { editRole(); }); | |
| 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 treeElement._prompt._element.dispatchEvent(InspectorTest.createKeyEvent( "Enter")); | |
| 33 self.runtime.sharedInstance(WebInspector.AccessibilitySidebarView).doUpd ate().then(() => { postRoleChange(); }); | |
| 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 . | |
| 50 </p> | |
| 51 | |
| 52 <button id="inspected" role="checkbox" aria-checked="true">ARIA checkbox</button > | |
| 53 | |
| 54 </body> | |
| 55 </html> | |
| OLD | NEW |