Fix keypad issue when ime context transit to another context
[framework/web/webkit-efl.git] / LayoutTests / accessibility / loading-iframe-updates-axtree.html
1 <html>
2 <head>
3 <script src="../fast/js/resources/js-test-pre.js"></script>
4
5   <script>
6     if (window.testRunner)
7         testRunner.waitUntilDone();
8
9     function runTest()
10     {
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.");
12
13         if (window.accessibilityController) {
14             window.root = accessibilityController.rootElement;
15             window.body = root.childAtIndex(0);
16             window.iframe = body.childAtIndex(1).childAtIndex(0);
17             window.scrollarea = iframe.childAtIndex(0);
18             window.subwebarea = scrollarea.childAtIndex(0);
19         }
20
21         window.iframeElement = document.getElementById("iframe");
22         iframeElement.addEventListener("load", function() {
23             if (window.accessibilityController) {
24                 window.newIframe = body.childAtIndex(1).childAtIndex(0);
25                 window.newScrollarea = newIframe.childAtIndex(0);
26                 window.newSubwebarea = newScrollarea.childAtIndex(0);
27
28                 shouldBeTrue("iframe.isEqual(newIframe)");
29                 shouldBeFalse("scrollarea.isEqual(newScrollarea)");
30                 shouldBeFalse("subwebarea.isEqual(newSubwebarea)");
31                 shouldBeTrue("newSubwebarea.childrenCount > 0");
32             }
33
34             debug('<br /><span class="pass">TEST COMPLETE</span>');
35             if (window.testRunner)
36                 testRunner.notifyDone();
37         }, false);
38
39         // Load content into the iframe. This will trigger the event
40         // handler above, which will check that the accessibility tree
41         // was updated with new content.
42         window.iframeElement.src = "data:text/html,<body><button>Click me</button></body>";
43
44     }
45
46     window.addEventListener('load', function() {
47         setTimeout(runTest, 10);
48     }, false);
49
50   </script>
51 </head>
52 <body>
53
54 <p>Before</p>
55
56 <iframe id="iframe"></iframe>
57
58 <p>After</p>
59
60 <p>End of test</p>
61
62 <p id="description"></p>
63 <div id="console"></div>
64
65 </body>
66 </html>