Merge "[Release] Webkit2-efl-123997_0.11.51" into tizen_2.1
[framework/web/webkit-efl.git] / LayoutTests / accessibility / aria-menubar-menuitems.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 <ul id="menubar" role="menubar" aria-owns="menuitem1 menuitem2">
9   <li id="menuitem1" role="menuitem" tabindex="0" aria-owns="submenu1">
10     Menu 1
11     <ul id="submenu1" role="menu">
12       <li id="menuitem11" role="menuitemradio" tabindex="-1">
13         Menu item 1.1
14       </li>
15     </ul>
16   </li>
17   <li id="menuitem2" role="menuitem" tabindex="0" aria-owns="submenu2">
18     Menu 2
19     <ul id="submenu2" role="menu">
20       <li id="menuitem21" role="menuitemradio" tabindex="-1">
21         Menu item 2.1
22       </li>
23       <li id="menuitem22" role="menuitemradio" tabindex="-1">
24         Menu item 2.2
25       </li>
26     </ul>
27   </li>
28 </ul>
29
30 <p id="description"></p>
31 <div id="console"></div>
32 <script>
33 description("This tests that ARIA menu items are properly exposed as children for menu bars");
34
35 if (window.layoutController) {
36     testRunner.dumpAsText();
37 }
38
39 if (window.accessibilityController) {
40     document.getElementById("body").focus();
41     var webArea = accessibilityController.focusedElement;
42
43     var menuBar = webArea.childAtIndex(0);
44     debug(menuBar.role);
45     shouldBe("menuBar.childrenCount", "2");
46
47     var menuItem = menuBar.childAtIndex(0);
48     debug(menuItem.role);
49     shouldBe("menuItem.childrenCount", "2");
50
51     var menuSubItem1 = menuItem.childAtIndex(0);
52     debug(menuSubItem1.role);
53     shouldBe("menuSubItem1.childrenCount", "0");
54
55     var menuSubItem2 = menuItem.childAtIndex(1);
56     debug(menuSubItem2.role);
57     shouldBe("menuSubItem2.childrenCount", "1");
58
59     var subMenuSubItem = menuSubItem2.childAtIndex(0);
60     debug(subMenuSubItem.role);
61     shouldBe("subMenuSubItem.childrenCount", "0");
62 }
63
64 </script>
65 <script src="../fast/js/resources/js-test-post.js"></script>
66 </body>
67 </html>