| 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/square.html"></iframe> | 4 <iframe id="iframe" seamless src="resources/square.html"></iframe> |
| 5 </div> | 5 </div> |
| 6 <script> | 6 <script> |
| 7 debug("Test basic seamless auto-sizing-to-content functionality.") | 7 debug("Test basic seamless auto-sizing-to-content functionality.") |
| 8 window.onload = function () { | 8 window.onload = function () { |
| 9 window.iframe = document.getElementById("iframe"); | 9 window.iframe = document.getElementById("iframe"); |
| 10 shouldBeTrue("iframe.seamless"); | 10 shouldBeTrue("iframe.seamless"); |
| 11 | 11 |
| 12 // Seamless iframes are blocks, filling their parent width | 12 // Seamless iframes are blocks, filling their parent width |
| (...skipping 12 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 // Make sure dynamic updates work too. | 26 // Make sure dynamic updates work too. |
| 27 iframe.contentDocument.documentElement.style.height = "200px"; | 27 iframe.contentDocument.documentElement.style.height = "200px"; |
| 28 shouldBeEqualToString("window.getComputedStyle(iframe).height", "200px"); | 28 shouldBeEqualToString("window.getComputedStyle(iframe).height", "200px"); |
| 29 | 29 |
| 30 window.parentDiv = document.getElementById("parent"); | 30 window.parentDiv = document.getElementById("parent"); |
| 31 window.parentDiv.style.width = "100px"; | 31 window.parentDiv.style.width = "100px"; |
| 32 shouldBeEqualToString("window.getComputedStyle(iframe).width", "100px"); | 32 shouldBeEqualToString("window.getComputedStyle(iframe).width", "100px"); |
| 33 } | 33 } |
| 34 </script> | 34 </script> |
| OLD | NEW |