90a2b3715ef73ca7ec7a5e8c92a05cc6b72ddfe2
[WebKit-https.git] / LayoutTests / accessibility / iframe-bastardization.html
1 <head>
2 <script>
3 var successfullyParsed = false;
4 </script>
5 <script src="../fast/js/resources/js-test-pre.js"></script>
6 </head>
7 <body id="body">
8
9     <iframe id='iframe1' scrolling=YES  width=100 height=100 border=1 src='resources/cake.png'></iframe>
10
11 <p id="description"></p>
12 <div id="console"></div>
13
14 <script>
15
16     description("This test makes sure that the AX parent chain hierarchy with iframes is correct");
17
18     if (window.accessibilityController) {
19
20         var body = document.getElementById("body");
21         body.focus();
22         var webArea = accessibilityController.focusedElement;
23
24         var group1 = webArea.childAtIndex(0);
25         var iframeScrollArea = group1.childAtIndex(0);
26         var iframeWebArea = iframeScrollArea.childAtIndex(0);
27             
28         var parentIframeWebArea = iframeWebArea.parentElement();
29         var parentIframeScrollArea = parentIframeWebArea.parentElement();
30         var parentGroup1 = parentIframeScrollArea.parentElement();
31
32         shouldBe("parentIframeWebArea.isEqual(iframeScrollArea)", "true");
33         shouldBe("parentIframeScrollArea.isEqual(group1)", "true");
34         shouldBe("parentGroup1.isEqual(webArea)", "true");
35     }
36
37     successfullyParsed = true;
38 </script>
39
40 <script src="../fast/js/resources/js-test-post.js"></script>
41 </body>
42 </html>