| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <script src="../../../resources/js-test.js"></script> | |
| 3 <div id="parent" style="width: 200px; height: 200px;"> | |
| 4 <iframe id="iframe" seamless sandbox="allow-same-origin" src="resources/nested-s
eamless.html"></iframe> | |
| 5 </div> | |
| 6 <script> | |
| 7 debug("Test that sandbox disables nested seamless iframes correctly.") | |
| 8 window.onload = function () { | |
| 9 window.iframe = document.getElementById("iframe"); | |
| 10 shouldBeTrue("iframe.seamless"); | |
| 11 | |
| 12 // The nested iframe is also "seamless", but the seamless-ness should be dis
abled by the sandbox. | |
| 13 window.nestedFrame = iframe.contentDocument.getElementById("iframe"); | |
| 14 shouldBeTrue("nestedFrame.seamless"); | |
| 15 // Even though it's prevented from actually being seamless, it should get th
e seamless styling from html.css. | |
| 16 shouldBeEqualToString("window.getComputedStyle(iframe).display", "block"); | |
| 17 shouldBeEqualToString("window.getComputedStyle(iframe).borderWidth", "0px"); | |
| 18 shouldBeEqualToString("window.getComputedStyle(iframe).borderStyle", "none")
; | |
| 19 | |
| 20 // The sandboxed iframe is still seamless, but the iframe inside it is not a
nd | |
| 21 // thus 300x150. Thus the sandboxed iframe should be the width of its parent
, | |
| 22 // but the height of its iframe child (which is intrinsicly 150px). | |
| 23 shouldBeEqualToString("window.getComputedStyle(iframe).width", "200px"); | |
| 24 shouldBeEqualToString("window.getComputedStyle(iframe).height", "150px"); | |
| 25 } | |
| 26 </script> | |
| OLD | NEW |