| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <!-- | 2 <!-- |
| 3 This tests that we don't break dynamic frameset layouts. | 3 This tests that we don't break dynamic frameset layouts. |
| 4 https://code.google.com/p/chromium/issues/detail?id=266882. | 4 https://code.google.com/p/chromium/issues/detail?id=266882. |
| 5 Visually it should show a green 100x100 square. | 5 Visually it should show a green 100x100 square. |
| 6 --> | 6 --> |
| 7 <script> | 7 <script> |
| 8 if (window.testRunner) { | 8 if (window.testRunner) |
| 9 testRunner.dumpAsText(); | 9 testRunner.dumpAsText(); |
| 10 // FIXME: Why is waitUntilDone needed? Shouldn't this body onload wait
for the subframes? | |
| 11 testRunner.waitUntilDone(); | |
| 12 } | |
| 13 | 10 |
| 14 function runTest() { | 11 function runTest() { |
| 15 var iframe = document.getElementById('target'); | 12 var iframe = document.getElementById('target'); |
| 16 iframe.offsetTop; // Make sure the iframe has already had a layout. | 13 iframe.offsetTop; // Make sure the iframe has already had a layout. |
| 17 iframe.style.height = '100px'; // Dynamically resize to 100 height. | 14 iframe.style.height = '100px'; // Dynamically resize to 100 height. |
| 18 // Check to make sure the inner frameset noticed the resize: | 15 // Check to make sure the inner frameset noticed the resize: |
| 19 var height = iframe.contentWindow.document.body.clientHeight; | 16 var height = iframe.contentWindow.document.body.clientHeight; |
| 20 if (height == 100) | 17 if (height == 100) |
| 21 document.write("PASS"); | 18 document.write("PASS"); |
| 22 else | 19 else |
| 23 document.write("FAIL, height should be 100, is: " + height); | 20 document.write("FAIL, height should be 100, is: " + height); |
| 24 | 21 document.close(); |
| 25 » if (window.testRunner) | |
| 26 » » testRunner.notifyDone(); | |
| 27 } | 22 } |
| 28 </script> | 23 </script> |
| 29 <iframe id="target" style="width: 100px; height: 1px; border: 0px" src="resource
s/frameset-dynamic-resize-inner1.html" onload="runTest()"></iframe> | 24 <iframe id="target" style="width: 100px; height: 1px; border: 0px" src="resource
s/frameset-dynamic-resize-inner1.html" onload="runTest()"></iframe> |
| OLD | NEW |