OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <link href="resources/flexbox.css" rel="stylesheet"> | 4 <link href="resources/flexbox.css" rel="stylesheet"> |
5 <style> | 5 <style> |
6 </style> | 6 </style> |
7 <script src="../../resources/testharness.js"></script> | 7 <script src="../../resources/testharness.js"></script> |
8 <script src="../../resources/testharnessreport.js"></script> | 8 <script src="../../resources/testharnessreport.js"></script> |
9 <script src="../../resources/check-layout-th.js"></script> | 9 <script src="../../resources/check-layout-th.js"></script> |
10 </head> | 10 </head> |
11 <body> | 11 <body> |
12 <div id=log></div> | 12 <div id=log></div> |
13 <p>Test to make sure that we properly relayout when an image loads. You | 13 <p>Test to make sure that we properly relayout when an image loads. You |
14 should see a green 100x100 image.</p> | 14 should see a green 100x100 image.</p> |
15 <div id="test" class="flexbox"> | 15 <div id="test" class="flexbox"> |
16 | 16 |
17 <div class="flexbox"> | 17 <div class="flexbox"> |
18 <img data-expected-width=100 data-expected-height=100 id="image" onload=
"imageLoaded()"> | 18 <img data-expected-width=100 data-expected-height=100 id="image" onload=
"imageLoaded()"> |
19 </div> | 19 </div> |
20 </div> | 20 </div> |
21 <script> | 21 <script> |
22 | 22 |
23 function changeImage() | 23 function changeImage() |
24 { | 24 { |
25 document.getElementById("image").src = "../images/resources/green-100.png"; | 25 document.getElementById("image").src = "../../images/resources/green-100.png
"; |
26 } | 26 } |
27 setTimeout(changeImage, 0); | 27 setTimeout(changeImage, 0); |
28 | 28 |
29 function imageLoaded() | 29 function imageLoaded() |
30 { | 30 { |
31 checkLayout('#test') | 31 checkLayout('#test') |
32 } | 32 } |
33 </script> | 33 </script> |
34 </body> | 34 </body> |
35 </html> | 35 </html> |
OLD | NEW |