| <title>Test for embedded iframe with height: 100% and anonymous table cell parent.</title> |
| <script src="../../resources/js-test-pre.js"></script> |
| testRunner.waitUntilDone(); |
| function getComputedStyleForElement(element, cssPropertyName) |
| if (window.getComputedStyle) { |
| return window.getComputedStyle(element, '').getPropertyValue(cssPropertyName.replace(/([A-Z])/g, "-$1").toLowerCase()); |
| if (element.currentStyle) { |
| return element.currentStyle[cssPropertyName]; |
| function parsePixelValue(str) |
| if (typeof str != "string" || str.length < 3 || str.substr(str.length - 2) != "px") { |
| testFailed(str + " is unparsable."); |
| return parsePixelValue(getComputedStyleForElement(document.getElementById(id), 'height')); |
| description("This test checks that iframe with percentage height within anonymous table cell has the correct height (strict mode)."); |
| shouldBe("getHeight('iframe-100')", "window.innerHeight"); |
| <div style="display:table; height: 100%;"> |
| <div style="display:table-row; height: 100%;"> |
| <iframe id="iframe-100" frameborder="0px" style="height: 100%;" src=""></iframe> |