Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / accessibility / image-load-on-delay.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 <div id="content">
9 <button>1</button>
10 <img src="resources/___.png" width=100 height=100 id="image">
11 <button>2</button>
12 </div>
13
14 <p id="description"></p>
15 <div id="console"></div>
16 <script>
17
18     description("This verifies that when an image loads its resource late, the AX tree is updated to re-add the image.");
19
20     if (window.accessibilityController) {
21           document.body.offsetHeight;
22           window.jsTestIsAsync = true;
23           var content = accessibilityController.accessibleElementById("content");
24           debug("BEFORE: Group count: " + content.childrenCount);
25
26           document.getElementById("image").onload = function() {
27               document.body.offsetHeight;
28               setTimeout(function() {
29                   debug("AFTER: Group count: " + content.childrenCount);
30                   finishJSTest();
31               }, 0);
32           };
33
34           setTimeout(function() { 
35               document.getElementById("image").src = "resources/cake.png"; 
36           }, 100);
37     }
38
39 </script>
40
41 <script src="../resources/js-test-post.js"></script>
42 </body>
43 </html>