OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script> | 4 <script> |
5 if (window.testRunner) { | 5 if (window.testRunner) { |
6 testRunner.dumpAsText(); | 6 testRunner.dumpAsText(); |
7 testRunner.dumpChildFramesAsText(); | 7 testRunner.dumpChildFramesAsText(); |
8 testRunner.dumpResourceLoadCallbacks(); | |
9 testRunner.waitUntilDone(); | 8 testRunner.waitUntilDone(); |
10 } | 9 } |
11 | 10 |
12 function checkIfDone() { | 11 function checkIfDone() { |
13 try { | 12 try { |
14 var url = document.querySelector('iframe').contentWindow.locatio
n.href; | 13 var url = document.querySelector('iframe').contentWindow.locatio
n.href; |
15 console.log("FAIL: Could read contentWindow.location.href"); | 14 console.log("FAIL: Could read contentWindow.location.href"); |
16 } catch (e) { | 15 } catch (e) { |
17 console.log("PASS: Access to contentWindow.location.href threw a
n exception."); | 16 console.log("PASS: Access to contentWindow.location.href threw a
n exception."); |
18 } | 17 } |
19 | 18 |
20 testRunner.notifyDone(); | 19 testRunner.notifyDone(); |
21 } | 20 } |
22 </script> | 21 </script> |
23 </head> | 22 </head> |
24 <body> | 23 <body> |
25 <p>The frame below should not load, proving that 'sameorigin, sameorigin' ==
= 'sameorigin'.</p> | 24 <p>The frame below should not load, proving that 'sameorigin, sameorigin' ==
= 'sameorigin'.</p> |
26 <iframe style="width:500px; height:500px" src="http://localhost:8000/securit
y/XFrameOptions/resources/x-frame-options-multiple-headers-sameorigin.cgi" onloa
d="checkIfDone()"></iframe> | 25 <iframe style="width:500px; height:500px" src="http://localhost:8000/securit
y/XFrameOptions/resources/x-frame-options-multiple-headers-sameorigin.cgi" onloa
d="checkIfDone()"></iframe> |
27 </body> | 26 </body> |
28 </html> | 27 </html> |
OLD | NEW |