OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <script src="../../../resources/js-test.js"></script> | |
3 <div style="width: 200px; height: 150px;"> | |
4 <iframe id="iframe1" seamless style="float: left" src="resources/two-inline-
blocks.html"></iframe> | |
5 </div> | |
6 <div style="width: 100px; height: 150px;"> | |
7 <iframe id="iframe2" seamless style="float: left" src="resources/two-inline-
blocks.html"></iframe> | |
8 </div> | |
9 <script> | |
10 debug("Test that floated seamless iframes 'shrink-wrap' their contents, as float
ed divs would.") | |
11 window.onload = function () { | |
12 window.iframe1 = document.getElementById("iframe1"); | |
13 window.iframe2 = document.getElementById("iframe2"); | |
14 | |
15 // Both iframes will "shrinkwrap" around their content as they are floated. | |
16 // iframe1 will not wrap, but iframe2 will. | |
17 shouldBeEqualToString("window.getComputedStyle(iframe1).width", "150px"); | |
18 shouldBeEqualToString("window.getComputedStyle(iframe1).height", "50px"); | |
19 shouldBeEqualToString("window.getComputedStyle(iframe2).width", "100px"); | |
20 shouldBeEqualToString("window.getComputedStyle(iframe2).height", "100px"); | |
21 } | |
22 </script> | |
OLD | NEW |