blob: f99a2c4f32dd5b7dc58a928ef6fcea376e25ef09 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test.js"></script>
</head>
<body>
<script>
description('Tests that querying dimensions in an iframe returns the correct value even before the parent frame has had a layout');
var iframe = document.createElement('iframe');
document.body.appendChild(iframe);
var heightBeforeLayout = iframe.contentWindow.innerHeight;
var forceLayout = iframe.offsetHeight;
var heightAfterLayout = iframe.contentWindow.innerHeight;
shouldBe('heightBeforeLayout', 'heightAfterLayout');
var iframe2 = document.createElement('iframe');
document.body.appendChild(iframe2);
var widthBeforeLayout = iframe2.contentWindow.innerWidth;
var forceLayout = iframe2.offsetHeight;
var widthAfterLayout = iframe2.contentWindow.innerWidth;
shouldBe('widthBeforeLayout', 'widthAfterLayout');
</script>
</body>
</html>