image not displayed in flexbox
[WebKit-https.git] / LayoutTests / css3 / flexbox / relayout-image-load.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <link href="resources/flexbox.css" rel="stylesheet">
5 <style>
6 </style>
7 <script src="../../resources/check-layout.js"></script>
8 </head>
9 <body>
10 <p>Test to make sure that we properly relayout when an image loads. You
11 should see a green 100x100 image.</p>
12 <div id="test" class="flexbox">
13     &nbsp;
14     <div class="flexbox">
15         <img data-expected-width=100 data-expected-height=100 id="image" onload="imageLoaded()">
16     </div>
17 </div>
18 <script>
19 if (window.testRunner) {
20     testRunner.dumpAsText();
21     testRunner.waitUntilDone();
22 }
23
24 function changeImage()
25 {
26     document.getElementById("image").src = "../images/resources/green-100.png";
27 }
28 setTimeout(changeImage, 0);
29
30 function imageLoaded()
31 {
32     checkLayout('#test')
33     if (window.testRunner)
34         testRunner.notifyDone();
35 }
36 </script>
37 </body>
38 </html>