3 <script src=
"../resources/js-test.js"></script>
7 testRunner
.waitUntilDone();
11 description("This tests that if an iframe loads new content after its accessibility object has already been accessed, the iframe accessibility object's descendants are the new scroll area and web area, not the old deleted ones.");
13 if (window
.accessibilityController
) {
14 window
.iframe
= accessibilityController
.accessibleElementById('iframe');
15 window
.scrollarea
= iframe
.childAtIndex(0);
16 window
.subwebarea
= scrollarea
.childAtIndex(0);
19 window
.iframeElement
= document
.getElementById("iframe");
20 iframeElement
.addEventListener("load", function() {
21 if (window
.accessibilityController
) {
22 window
.newIframe
= accessibilityController
.accessibleElementById('iframe');
23 window
.newScrollarea
= newIframe
.childAtIndex(0);
24 window
.newSubwebarea
= newScrollarea
.childAtIndex(0);
26 shouldBeTrue("iframe.isEqual(newIframe)");
27 shouldBeFalse("scrollarea.isEqual(newScrollarea)");
28 shouldBeFalse("subwebarea.isEqual(newSubwebarea)");
29 shouldBeTrue("newSubwebarea.childrenCount > 0");
32 debug('<br /><span class="pass">TEST COMPLETE</span>');
33 if (window
.testRunner
)
34 testRunner
.notifyDone();
37 // Load content into the iframe. This will trigger the event
38 // handler above, which will check that the accessibility tree
39 // was updated with new content.
40 window
.iframeElement
.src
= "data:text/html,<body><button>Click me</button></body>";
44 window
.addEventListener('load', function() {
54 <iframe id=
"iframe" role=
"group"></iframe>
60 <p id=
"description"></p>
61 <div id=
"console"></div>