OLD | NEW |
1 <script> | 1 <script> |
2 if (window.testRunner) { | 2 if (window.testRunner) { |
3 testRunner.dumpAsText(); | 3 testRunner.dumpAsText(); |
4 testRunner.dumpChildFramesAsText(); | 4 testRunner.dumpChildFramesAsText(); |
5 testRunner.dumpResourceLoadCallbacks(); | |
6 testRunner.waitUntilDone(); | 5 testRunner.waitUntilDone(); |
7 } | 6 } |
8 | 7 |
9 function checkIfDone() { | 8 function checkIfDone() { |
10 try { | 9 try { |
11 var url = document.querySelector('iframe').contentWindow.location.hr
ef; | 10 var url = document.querySelector('iframe').contentWindow.location.hr
ef; |
12 console.log("FAIL: Could read contentWindow.location.href"); | 11 console.log("FAIL: Could read contentWindow.location.href"); |
13 } catch (e) { | 12 } catch (e) { |
14 console.log("PASS: Access to contentWindow.location.href threw an ex
ception."); | 13 console.log("PASS: Access to contentWindow.location.href threw an ex
ception."); |
15 } | 14 } |
16 | 15 |
17 testRunner.notifyDone(); | 16 testRunner.notifyDone(); |
18 } | 17 } |
19 </script> | 18 </script> |
20 | 19 |
21 <p>There should be no content in the iframe below</p> | 20 <p>There should be no content in the iframe below</p> |
22 <iframe style="width:500px; height:500px" src="http://localhost:8000/security/XF
rameOptions/resources/x-frame-options-parent-same-origin-allow.cgi" onload="chec
kIfDone()"></iframe> | 21 <iframe style="width:500px; height:500px" src="http://localhost:8000/security/XF
rameOptions/resources/x-frame-options-parent-same-origin-allow.cgi" onload="chec
kIfDone()"></iframe> |
OLD | NEW |