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 sandbox srcdoc="<html style='width: 100px; height:
100px; background-color: green'></html>"></iframe> | 4 <iframe id="iframe" seamless sandbox srcdoc="<html style='width: 100px; height:
100px; background-color: green'></html>"></iframe> |
5 </div> | 5 </div> |
6 <script> | 6 <script> |
7 debug("Test that iframes with srcdoc contents can still be seamless.") | 7 debug("Test that iframes with srcdoc contents can still be seamless.") |
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 // When an iframe is sandboxed, its origin is unique, thus seamless check | 11 // When an iframe is sandboxed, its origin is unique, thus seamless check |
12 // should fail, but the spec makes a specific exception for srcdoc iframes. | 12 // should fail, but the spec makes a specific exception for srcdoc iframes. |
13 shouldBeEqualToString("window.getComputedStyle(iframe).width", "200px"); | 13 shouldBeEqualToString("window.getComputedStyle(iframe).width", "200px"); |
14 shouldBeEqualToString("window.getComputedStyle(iframe).height", "100px"); | 14 shouldBeEqualToString("window.getComputedStyle(iframe).height", "100px"); |
15 } | 15 } |
16 </script> | 16 </script> |
OLD | NEW |