blob: db6b27f96feb262b91e940169393214600c66e7f [file] [log] [blame]
<!DOCTYPE html>
<!--
This tests that we don't break dynamic frameset layouts.
https://code.google.com/p/chromium/issues/detail?id=266882.
Visually it should show a green 100x100 square.
-->
<script>
if (window.testRunner) {
testRunner.dumpAsText();
// FIXME: Why is waitUntilDone needed? Shouldn't this body onload wait for the subframes?
testRunner.waitUntilDone();
}
function runTest() {
var iframe = document.getElementById('target');
iframe.offsetTop; // Make sure the iframe has already had a layout.
iframe.style.height = '100px'; // Dynamically resize to 100 height.
// Check to make sure the inner frameset noticed the resize:
var height = iframe.contentWindow.document.body.clientHeight;
if (height == 100)
document.write("PASS");
else
document.write("FAIL, height should be 100, is: " + height);
document.close();
if (window.testRunner)
testRunner.notifyDone();
}
</script>
<iframe id="target" style="width: 100px; height: 1px; border: 0px" src="resources/frameset-dynamic-resize-inner1.html" onload="runTest()"></iframe>