OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../resources/js-test.js"></script> | 3 <script src="../resources/js-test.js"></script> |
4 | 4 |
5 <script> | 5 <script> |
6 if (window.testRunner) | 6 if (window.testRunner) |
7 testRunner.waitUntilDone(); | 7 testRunner.waitUntilDone(); |
8 | 8 |
9 function runTest() | 9 function runTest() |
10 { | 10 { |
11 description("This tests that if an iframe loads new content after its ac
cessibility object has already been accessed, the iframe accessibility object's
descendants are the new scroll area and web area, not the old deleted ones."); | 11 description("This tests that if an iframe loads new content after its ac
cessibility object has already been accessed, the iframe accessibility object's
descendants are the new scroll area and web area, not the old deleted ones."); |
12 | 12 |
13 if (window.accessibilityController) { | 13 if (window.accessibilityController) { |
14 window.iframe = accessibilityController.accessibleElementById('ifram
e'); | 14 window.iframe = accessibilityController.accessibleElementById('ifram
e'); |
15 window.scrollarea = iframe.childAtIndex(0); | 15 window.subwebarea = iframe.childAtIndex(0); |
16 window.subwebarea = scrollarea.childAtIndex(0); | |
17 } | 16 } |
18 | 17 |
19 window.iframeElement = document.getElementById("iframe"); | 18 window.iframeElement = document.getElementById("iframe"); |
20 iframeElement.addEventListener("load", function() { | 19 iframeElement.addEventListener("load", function() { |
21 if (window.accessibilityController) { | 20 if (window.accessibilityController) { |
22 window.newIframe = accessibilityController.accessibleElementById
('iframe'); | 21 window.newIframe = accessibilityController.accessibleElementById
('iframe'); |
23 window.newScrollarea = newIframe.childAtIndex(0); | 22 window.newSubwebarea = newIframe.childAtIndex(0); |
24 window.newSubwebarea = newScrollarea.childAtIndex(0); | |
25 | 23 |
26 shouldBeTrue("iframe.isEqual(newIframe)"); | 24 shouldBeTrue("iframe.isEqual(newIframe)"); |
27 shouldBeFalse("scrollarea.isEqual(newScrollarea)"); | |
28 shouldBeFalse("subwebarea.isEqual(newSubwebarea)"); | 25 shouldBeFalse("subwebarea.isEqual(newSubwebarea)"); |
29 shouldBeTrue("newSubwebarea.childrenCount > 0"); | 26 shouldBeTrue("newSubwebarea.childrenCount > 0"); |
30 } | 27 } |
31 | 28 |
32 debug('<br /><span class="pass">TEST COMPLETE</span>'); | 29 debug('<br /><span class="pass">TEST COMPLETE</span>'); |
33 if (window.testRunner) | 30 if (window.testRunner) |
34 testRunner.notifyDone(); | 31 testRunner.notifyDone(); |
35 }, false); | 32 }, false); |
36 | 33 |
37 // Load content into the iframe. This will trigger the event | 34 // Load content into the iframe. This will trigger the event |
(...skipping 17 matching lines...) Expand all Loading... |
55 | 52 |
56 <p>After</p> | 53 <p>After</p> |
57 | 54 |
58 <p>End of test</p> | 55 <p>End of test</p> |
59 | 56 |
60 <p id="description"></p> | 57 <p id="description"></p> |
61 <div id="console"></div> | 58 <div id="console"></div> |
62 | 59 |
63 </body> | 60 </body> |
64 </html> | 61 </html> |
OLD | NEW |