| <!DOCTYPE html> |
| <script src="/js-test-resources/js-test-pre.js"></script> |
| <div style="width: 200px; height: 200px;"> |
| <iframe id="iframe1" seamless src="http://127.0.0.1:8000/security/seamless/resources/square.html"></iframe> |
| </div> |
| <div style="width: 200px; height: 200px;"> |
| <iframe id="iframe2" seamless src="http://localhost:8000/security/seamless/resources/square.html"></iframe> |
| </div> |
| <script> |
| window.onload = function () { |
| window.iframe1 = document.getElementById("iframe1"); |
| window.iframe2 = document.getElementById("iframe2"); |
| shouldBeTrue("iframe1.seamless"); |
| shouldBeTrue("iframe2.seamless"); |
| |
| // http tests use 127.0.0.1 as their origin, but "localhost" will resolve |
| // to the same address (yet technically be a different origin). |
| // The first iframe should display seamless, but the second should not. |
| shouldBeEqualToString("window.getComputedStyle(iframe1).width", "200px"); |
| shouldBeEqualToString("window.getComputedStyle(iframe1).height", "100px"); |
| |
| shouldBeEqualToString("window.getComputedStyle(iframe2).width", "300px"); |
| shouldBeEqualToString("window.getComputedStyle(iframe2).height", "150px"); |
| } |
| </script> |