tizen beta release
[framework/web/webkit-efl.git] / LayoutTests / platform / mac / accessibility / mixed-checkbox.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../../fast/js/resources/js-test-pre.js"></script>
5 </head>
6 <body id="body">
7
8 <div tabindex=0 id="box1" role="checkbox" aria-checked="false">checkbox1</div><BR>
9 <div tabindex=0 id="box2" role="checkbox" aria-checked="true">checkbox2</div><BR>
10 <div tabindex=0 id="box3" role="checkbox" aria-checked="mixed">checkbox3</div><BR>
11 <div tabindex=0 id="box4" role="checkbox">checkbox4</div><BR>
12 <input tabindex=0 id="box5" type="checkbox" role="checkbox" aria-checked="true"><br>
13
14 <p id="description"></p>
15 <div id="console"></div>
16
17 <script>
18
19     description("This tests that checkboxes will return the right AXValue for false/true/mixed.");
20
21     if (window.accessibilityController) {
22
23           // aria-state=false
24           document.getElementById("box1").focus();
25           shouldBe("accessibilityController.focusedElement.intValue", "0");
26
27           // aria-state=true
28           document.getElementById("box2").focus();
29           shouldBe("accessibilityController.focusedElement.intValue", "1");
30
31           // aria-state=mixed
32           document.getElementById("box3").focus();
33           shouldBe("accessibilityController.focusedElement.intValue", "2");
34
35           // no aria state, default to off
36           document.getElementById("box4").focus();
37           shouldBe("accessibilityController.focusedElement.intValue", "0");
38
39           // native checkbox is also aria checkbox, default to native semantics
40           document.getElementById("box5").focus();
41           shouldBe("accessibilityController.focusedElement.intValue", "0");
42
43     }
44
45 </script>
46
47 <script src="../../../fast/js/resources/js-test-post.js"></script>
48 </body>
49 </html>