Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / accessibility / disabled-controls-not-focusable.html
1 <!DOCTYPE HTML>
2 <html>
3 <body>
4 <script src="../resources/js-test-pre.js"></script>
5
6 <div>
7   <button id="button"></button>
8   <input id="text" type="text">
9   <input id="checkbox" type="checkbox">
10   <input id="radio" type="radio">
11   <input id="submit" type="submit">
12   <input id="slider" type="range">
13   <select id="combobox"><option>1<option>2</select>
14   <select id="listbox" multiple><option>1<option>2</select>
15   <textarea id="textarea"></textarea>
16 </div>
17
18 <div id="console"></div>
19 <script>
20 description("This test makes sure that disabled form controls are not exposed as focusable.");
21
22 if (window.testRunner && window.accessibilityController) {
23     window.testRunner.dumpAsText();
24
25     function checkControl(id) {
26         window.element = document.getElementById(id);
27         debug(element.id);
28         element.focus();
29         window.axElement = accessibilityController.focusedElement;
30         shouldBeTrue("axElement.isFocusable");
31         element.disabled = true;
32         shouldBeFalse("axElement.isFocusable");
33     }
34
35     checkControl("button");
36     checkControl("text");
37     checkControl("checkbox");
38     checkControl("radio");
39     checkControl("submit");
40     checkControl("slider");
41     checkControl("combobox");
42     checkControl("listbox");
43     checkControl("textarea");
44 }
45
46 </script>
47
48 <script src="../resources/js-test-post.js"></script>
49 </body>
50 </html>