| <!DOCTYPE html> |
| <script src="../../js/resources/js-test-pre.js"></script> |
| <div style="width: 200px; height: 150px;"> |
| <iframe id="iframe1" seamless style="float: left" src="resources/two-inline-blocks.html"></iframe> |
| </div> |
| <div style="width: 100px; height: 150px;"> |
| <iframe id="iframe2" seamless style="float: left" src="resources/two-inline-blocks.html"></iframe> |
| </div> |
| <script> |
| debug("Test that floated seamless iframes 'shrink-wrap' their contents, as floated divs would.") |
| window.onload = function () { |
| window.iframe1 = document.getElementById("iframe1"); |
| window.iframe2 = document.getElementById("iframe2"); |
| |
| // Both iframes will "shrinkwrap" around their content as they are floated. |
| // iframe1 will not wrap, but iframe2 will. |
| shouldBeEqualToString("window.getComputedStyle(iframe1).width", "150px"); |
| shouldBeEqualToString("window.getComputedStyle(iframe1).height", "50px"); |
| shouldBeEqualToString("window.getComputedStyle(iframe2).width", "100px"); |
| shouldBeEqualToString("window.getComputedStyle(iframe2).height", "100px"); |
| } |
| </script> |