OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../../js/resources/js-test-pre.js"></script> | 2 <script src="../../../resources/js-test.js"></script> |
3 <div id="parent" style="width: 200px; height: 200px;"> | 3 <div id="parent" style="width: 200px; height: 200px;"> |
4 <iframe id="iframe" seamless src="resources/percent-square.html"></iframe> | 4 <iframe id="iframe" seamless src="resources/percent-square.html"></iframe> |
5 </div> | 5 </div> |
6 <script> | 6 <script> |
7 debug("Test that the 'initial containing block height' is 0 for seamless child d
ocuments.") | 7 debug("Test that the 'initial containing block height' is 0 for seamless child d
ocuments.") |
8 window.onload = function () { | 8 window.onload = function () { |
9 window.iframe = document.getElementById("iframe"); | 9 window.iframe = document.getElementById("iframe"); |
10 | 10 |
11 // Width 100% still works as expected. | 11 // Width 100% still works as expected. |
12 shouldBeEqualToString("window.getComputedStyle(iframe).width", "200px"); | 12 shouldBeEqualToString("window.getComputedStyle(iframe).width", "200px"); |
13 | 13 |
14 // But height: 100% should be 0, per the spec: | 14 // But height: 100% should be 0, per the spec: |
15 // In visual media, in a CSS-supporting user agent: the user agent must forc
e the | 15 // In visual media, in a CSS-supporting user agent: the user agent must forc
e the |
16 // height of the initial containing block of the active document of the nest
ed | 16 // height of the initial containing block of the active document of the nest
ed |
17 // browsing context of the iframe to zero. | 17 // browsing context of the iframe to zero. |
18 shouldBeEqualToString("window.getComputedStyle(iframe).height", "0px"); | 18 shouldBeEqualToString("window.getComputedStyle(iframe).height", "0px"); |
19 } | 19 } |
20 </script> | 20 </script> |
OLD | NEW |