Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / accessibility / aria-controls.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../resources/js-test-pre.js"></script>
5 </head>
6 <body id="body">
7
8 <ul id="tablist" role="tablist">
9 <li id="tab1" role="tab" aria-controls="panel1 panel2"></li>
10 </ul>
11
12 <div id="panel1">Panel 1</div>
13 <div id="panel2">Panel 2</div>
14
15 <p id="description"></p>
16 <div id="console"></div>
17
18 <script>
19     description("This tests that aria-controls returns correct element at the given index");
20
21     if (window.accessibilityController) {
22         var tablist = accessibilityController.accessibleElementById("tablist");
23         var tab1 = tablist.childAtIndex(0);
24
25         if (accessibilityController.platformName == "mac") {
26             shouldBe("tab1.ariaControlsElementAtIndex(0).childAtIndex(0).stringValue", "'AXValue: Panel 1'");
27             shouldBe("tab1.ariaControlsElementAtIndex(1).childAtIndex(0).stringValue", "'AXValue: Panel 2'");
28         } else {
29             shouldBe("tab1.ariaControlsElementAtIndex(0).stringValue", "'AXValue: Panel 1'");
30             shouldBe("tab1.ariaControlsElementAtIndex(1).stringValue", "'AXValue: Panel 2'");
31         }
32     }
33
34 </script>
35
36 <script src="../resources/js-test-post.js"></script>
37 </body>
38 </html>