upload tizen1.0 source
[framework/web/webkit-efl.git] / LayoutTests / accessibility / aria-option-role.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 role="listbox">
9 <div role="option">option 1</div>
10 <div role="option" aria-label="label 2">option 2</div>
11 </div>
12
13 <p id="description"></p>
14 <div id="console"></div>
15
16 <script>
17
18     description("This tests that the aria 'option' role works as expected. That is, it becomes a static text element with no children.");
19
20     if (window.accessibilityController) {
21
22           var body = document.getElementById("body");
23           body.focus();
24
25           var listBox = accessibilityController.focusedElement.childAtIndex(0);
26           var firstChild = listBox.childAtIndex(0);
27           var secondChild = listBox.childAtIndex(1);
28           shouldBe("firstChild.role", "'AXRole: AXStaticText'");
29           shouldBe("firstChild.title", "'AXTitle: option 1'");
30
31           shouldBe("secondChild.role", "'AXRole: AXStaticText'");
32           shouldBe("secondChild.description", "'AXDescription: label 2'");
33
34           shouldBe("firstChild.childrenCount", "0");
35           shouldBe("secondChild.childrenCount", "0");
36     }
37
38 </script>
39
40 <script src="../fast/js/resources/js-test-post.js"></script>
41 </body>
42 </html>