| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <script src="/js-test-resources/js-test.js"></script> | |
| 3 <div style="width: 200px; height: 200px;"> | |
| 4 <iframe id="iframe1" seamless src="http://127.0.0.1:8000/security/seamless/resou
rces/square.html"></iframe> | |
| 5 </div> | |
| 6 <div style="width: 200px; height: 200px;"> | |
| 7 <iframe id="iframe2" seamless src="http://localhost:8000/security/seamless/resou
rces/square.html"></iframe> | |
| 8 </div> | |
| 9 <script> | |
| 10 window.onload = function () { | |
| 11 window.iframe1 = document.getElementById("iframe1"); | |
| 12 window.iframe2 = document.getElementById("iframe2"); | |
| 13 shouldBeTrue("iframe1.seamless"); | |
| 14 shouldBeTrue("iframe2.seamless"); | |
| 15 | |
| 16 // http tests use 127.0.0.1 as their origin, but "localhost" will resolve | |
| 17 // to the same address (yet technically be a different origin). | |
| 18 // The first iframe should display seamless, but the second should not. | |
| 19 shouldBeEqualToString("window.getComputedStyle(iframe1).width", "200px"); | |
| 20 shouldBeEqualToString("window.getComputedStyle(iframe1).height", "100px"); | |
| 21 | |
| 22 shouldBeEqualToString("window.getComputedStyle(iframe2).width", "300px"); | |
| 23 shouldBeEqualToString("window.getComputedStyle(iframe2).height", "150px"); | |
| 24 } | |
| 25 </script> | |
| OLD | NEW |