OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <iframe src="resources/sandbox.php?sandbox=allow-scripts%20allow-same-origin"></
iframe> | 2 <iframe src="resources/sandbox.php?sandbox=allow-scripts%20allow-same-origin"></
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 var secret = frame.contentWindow.secret; | 9 var secret = frame.contentWindow.secret; |
10 if (secret) | 10 if (secret) |
11 alert("PASS: Iframe was not in a unique origin"); | 11 console.log("PASS: Iframe was not in a unique origin"); |
12 else | 12 else |
13 alert("FAIL: Iframe was in a unique origin"); | 13 console.log("FAIL: Iframe was in a unique origin"); |
14 }; | 14 }; |
15 </script> | 15 </script> |
OLD | NEW |