Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(500)

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/elements/accessibility/edit-aria-attributes.html

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/elements-test.js"></script> 4 <script src="../../../http/tests/inspector/elements-test.js"></script>
5 <script src="accessibility-pane-test.js"></script> 5 <script src="accessibility-pane-test.js"></script>
6 <script> 6 <script>
7 7
8 function test() 8 function test()
9 { 9 {
10 WebInspector.viewManager.showView("accessibility.view") 10 UI.viewManager.showView("accessibility.view")
11 .then(() => InspectorTest.selectNodeAndWaitForAccessibility("inspected") ) 11 .then(() => InspectorTest.selectNodeAndWaitForAccessibility("inspected") )
12 .then(editAriaChecked); 12 .then(editAriaChecked);
13 13
14 function editAriaChecked() 14 function editAriaChecked()
15 { 15 {
16 InspectorTest.addResult("=== Before attribute modification ==="); 16 InspectorTest.addResult("=== Before attribute modification ===");
17 InspectorTest.dumpSelectedElementAccessibilityNode(); 17 InspectorTest.dumpSelectedElementAccessibilityNode();
18 var treeElement = InspectorTest.findARIAAttributeTreeElement("aria-check ed"); 18 var treeElement = InspectorTest.findARIAAttributeTreeElement("aria-check ed");
19 treeElement._startEditing(); 19 treeElement._startEditing();
20 treeElement._prompt._element.textContent = "false"; 20 treeElement._prompt._element.textContent = "false";
21 treeElement._prompt._element.dispatchEvent(InspectorTest.createKeyEvent( "Enter")); 21 treeElement._prompt._element.dispatchEvent(InspectorTest.createKeyEvent( "Enter"));
22 self.runtime.sharedInstance(WebInspector.AccessibilitySidebarView).doUpd ate().then(() => { editRole(); }); 22 self.runtime.sharedInstance(Accessibility.AccessibilitySidebarView).doUp date().then(() => { editRole(); });
23 } 23 }
24 24
25 function editRole() 25 function editRole()
26 { 26 {
27 InspectorTest.addResult("=== After attribute modification ==="); 27 InspectorTest.addResult("=== After attribute modification ===");
28 InspectorTest.dumpSelectedElementAccessibilityNode(); 28 InspectorTest.dumpSelectedElementAccessibilityNode();
29 var treeElement = InspectorTest.findARIAAttributeTreeElement("role"); 29 var treeElement = InspectorTest.findARIAAttributeTreeElement("role");
30 treeElement._startEditing(); 30 treeElement._startEditing();
31 treeElement._prompt._element.textContent = "radio"; 31 treeElement._prompt._element.textContent = "radio";
32 treeElement._prompt._element.dispatchEvent(InspectorTest.createKeyEvent( "Enter")); 32 treeElement._prompt._element.dispatchEvent(InspectorTest.createKeyEvent( "Enter"));
33 self.runtime.sharedInstance(WebInspector.AccessibilitySidebarView).doUpd ate().then(() => { postRoleChange(); }); 33 self.runtime.sharedInstance(Accessibility.AccessibilitySidebarView).doUp date().then(() => { postRoleChange(); });
34 } 34 }
35 35
36 function postRoleChange() 36 function postRoleChange()
37 { 37 {
38 InspectorTest.addResult("=== After role modification ==="); 38 InspectorTest.addResult("=== After role modification ===");
39 InspectorTest.dumpSelectedElementAccessibilityNode(); 39 InspectorTest.dumpSelectedElementAccessibilityNode();
40 InspectorTest.completeTest(); 40 InspectorTest.completeTest();
41 } 41 }
42 } 42 }
43 43
44 </script> 44 </script>
45 </head> 45 </head>
46 46
47 <body onload="runTest()"> 47 <body onload="runTest()">
48 <p> 48 <p>
49 Tests that writing an ARIA attribute causes the accessibility node to be updated . 49 Tests that writing an ARIA attribute causes the accessibility node to be updated .
50 </p> 50 </p>
51 51
52 <button id="inspected" role="checkbox" aria-checked="true">ARIA checkbox</button > 52 <button id="inspected" role="checkbox" aria-checked="true">ARIA checkbox</button >
53 53
54 </body> 54 </body>
55 </html> 55 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698