OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <iframe src="resources/sandbox.php?sandbox=allow-scripts"></iframe> | 2 <iframe src="resources/sandbox.php?sandbox=allow-scripts"></iframe> |
3 <script> | 3 <script> |
4 if (window.testRunner) | 4 if (window.testRunner) |
5 testRunner.dumpAsText(); | 5 testRunner.dumpAsText(); |
6 | 6 |
7 window.onload = function() { | 7 window.onload = function() { |
8 var frame = document.getElementsByTagName("iframe")[0]; | 8 var frame = document.getElementsByTagName("iframe")[0]; |
9 try { | 9 try { |
10 var secret = frame.contentWindow.secret; | 10 var secret = frame.contentWindow.secret; |
11 alert("FAIL: Iframe was not in a unique origin: " + secret); | 11 console.log("FAIL: Iframe was not in a unique origin: " + secret); |
12 } catch (e) { | 12 } catch (e) { |
13 alert("PASS: Iframe was in a unique origin"); | 13 console.log("PASS: Iframe was in a unique origin"); |
14 } | 14 } |
15 }; | 15 }; |
16 </script> | 16 </script> |
OLD | NEW |