| <!DOCTYPE html> |
| <script src="../../js/resources/js-test-pre.js"></script> |
| <div id="parent" style="width: 200px; height: 200px;"> |
| <iframe id="iframe1" seamless style="min-width: 300px; min-height: 300px " src="resources/square.html"></iframe> |
| <iframe id="iframe2" seamless style="max-width: 50px; max-height: 50px" src="resources/square.html"></iframe> |
| </div> |
| <script> |
| debug("Test that seamless iframes respect min/max height/width CSS styles.") |
| window.onload = function () { |
| window.iframe1 = document.getElementById("iframe1"); |
| window.iframe2 = document.getElementById("iframe2"); |
| |
| // Seamless should respect min/max CSS values like any other element. |
| shouldBeEqualToString("window.getComputedStyle(iframe1).width", "300px"); |
| shouldBeEqualToString("window.getComputedStyle(iframe1).height", "300px"); |
| |
| shouldBeEqualToString("window.getComputedStyle(iframe2).width", "50px"); |
| shouldBeEqualToString("window.getComputedStyle(iframe2).height", "50px"); |
| } |
| </script> |