blob: 4680a0ac1932719bcfa689d6e39ca962b64fa7a9 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../js/resources/js-test-pre.js"></script>
<div id="parent" style="width: 200px; height: 200px;">
<iframe id="iframe" seamless src="resources/percent-square.html"></iframe>
</div>
<script>
debug("Test that the 'initial containing block height' is 0 for seamless child documents.")
window.onload = function () {
window.iframe = document.getElementById("iframe");
// Width 100% still works as expected.
shouldBeEqualToString("window.getComputedStyle(iframe).width", "200px");
// But height: 100% should be 0, per the spec:
// In visual media, in a CSS-supporting user agent: the user agent must force the
// height of the initial containing block of the active document of the nested
// browsing context of the iframe to zero.
shouldBeEqualToString("window.getComputedStyle(iframe).height", "0px");
}
</script>