| 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? | 10 // FIXME: Why is waitUntilDone needed? Shouldn't this body onload wait
for the subframes? |
| 11 testRunner.waitUntilDone(); | 11 testRunner.waitUntilDone(); |
| 12 } | 12 } |
| 13 | 13 |
| 14 function runTest() { | 14 function runTest() { |
| 15 var iframe = document.getElementById('target'); | 15 var iframe = document.getElementById('target'); |
| 16 iframe.offsetTop; // Make sure the iframe has already had a layout. | 16 iframe.offsetTop; // Make sure the iframe has already had a layout. |
| 17 iframe.style.height = '100px'; // Dynamically resize to 100 height. | 17 iframe.style.height = '100px'; // Dynamically resize to 100 height. |
| 18 // Check to make sure the inner frameset noticed the resize: | 18 // Check to make sure the inner frameset noticed the resize: |
| 19 var height = iframe.contentWindow.document.body.clientHeight; | 19 var height = iframe.contentWindow.document.body.clientHeight; |
| 20 if (height == 100) | 20 if (height == 100) |
| 21 document.write("PASS"); | 21 document.write("PASS"); |
| 22 else | 22 else |
| 23 document.write("FAIL, height should be 100, is: " + height); | 23 document.write("FAIL, height should be 100, is: " + height); |
| 24 | 24 |
| 25 document.close(); |
| 25 if (window.testRunner) | 26 if (window.testRunner) |
| 26 testRunner.notifyDone(); | 27 testRunner.notifyDone(); |
| 27 } | 28 } |
| 28 </script> | 29 </script> |
| 29 <iframe id="target" style="width: 100px; height: 1px; border: 0px" src="resource
s/frameset-dynamic-resize-inner1.html" onload="runTest()"></iframe> | 30 <iframe id="target" style="width: 100px; height: 1px; border: 0px" src="resource
s/frameset-dynamic-resize-inner1.html" onload="runTest()"></iframe> |
| OLD | NEW |