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

Side by Side Diff: third_party/WebKit/LayoutTests/accessibility/listbox-enabled-states.html

Issue 1705853002: NOT FOR REVIEW. ax tree focus with debugging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed crash Created 4 years, 10 months 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="../resources/js-test.js"></script> 3 <script src="../resources/js-test.js"></script>
4 </head> 4 </head>
5 5
6 <body id="body"> 6 <body id="body">
7 7
8 <select id="selectElement" multiple title="selectElement"> 8 <select id="selectElement" multiple title="selectElement">
9 <option SELECTED>Option 1</option> 9 <option SELECTED>Option 1</option>
10 <option>Option 2</option> 10 <option>Option 2</option>
11 <option DISABLED>Option 3</option> 11 <option DISABLED>Option 3</option>
12 <option aria-disabled="true">Option 4</option> 12 <option aria-disabled="true">Option 4</option>
13 <option aria-disabled="false">Option 5</option> 13 <option aria-disabled="false">Option 5</option>
14 </select> 14 </select>
15 15
16 <p>This tests that we report the correct enabled state on a listbox.</p> 16 <p>This tests that we report the correct enabled state on a listbox.</p>
17 17
18 <p id="notDRT">This test should only be run inside of DumpRenderTree.</p> 18 <p id="notDRT">This test should only be run inside of DumpRenderTree.</p>
19 19
20 <p id="console"></p> 20 <p id="console"></p>
21 21
22 <script> 22 <script>
23 if (window.testRunner && window.accessibilityController) { 23 if (window.testRunner && window.accessibilityController) {
24 document.getElementById("notDRT").style.visibility = "hidden"; 24 document.getElementById("notDRT").style.visibility = "hidden";
25 25
26 testRunner.dumpAsText(); 26 testRunner.dumpAsText();
27 27
28 document.getElementById("selectElement").focus(); 28 document.getElementById("selectElement").focus();
29 29
30 shouldBeTrue('accessibilityController.focusedElement.isEnabled'); 30 var axSelectElement = accessibilityController.focusedElement;
31 shouldBeTrue('accessibilityController.focusedElement.childAtIndex(0).isE nabled'); 31 shouldBeTrue('axSelectElement.isEnabled');
32 shouldBeTrue('accessibilityController.focusedElement.childAtIndex(1).isE nabled'); 32 shouldBeTrue('axSelectElement.childAtIndex(0).isEnabled');
33 shouldBeFalse('accessibilityController.focusedElement.childAtIndex(2).is Enabled'); 33 shouldBeTrue('axSelectElement.childAtIndex(1).isEnabled');
34 shouldBeFalse('accessibilityController.focusedElement.childAtIndex(3).is Enabled'); 34 shouldBeFalse('axSelectElement.childAtIndex(2).isEnabled');
35 shouldBeTrue('accessibilityController.focusedElement.childAtIndex(4).isE nabled'); 35 shouldBeFalse('axSelectElement.childAtIndex(3).isEnabled');
36 shouldBeTrue('axSelectElement.childAtIndex(4).isEnabled');
36 } 37 }
37 </script> 38 </script>
38 39
39 </body> 40 </body>
40 </html> 41 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698