OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="http://localhost:8000/security/xssAuditor/resources/utilities.js"><
/script> | 4 <script src="http://localhost:8000/security/xssAuditor/resources/utilities.js"><
/script> |
5 <script> | 5 <script> |
6 if (window.testRunner) { | 6 if (window.testRunner) { |
7 testRunner.dumpAsText(); | 7 testRunner.dumpAsText(); |
8 testRunner.dumpChildFramesAsText(); | 8 testRunner.dumpChildFramesAsText(); |
9 testRunner.waitUntilDone(); | 9 testRunner.waitUntilDone(); |
10 testRunner.setXSSAuditorEnabled(true); | 10 testRunner.setXSSAuditorEnabled(true); |
11 } | 11 } |
| 12 |
| 13 function checkframe() |
| 14 { |
| 15 try { |
| 16 var ref = document.getElementById("frame").contentDocument.referrer; |
| 17 alert('Referrer is "' + ref + '"'); |
| 18 } catch (e) {} |
| 19 checkIfFrameLocationMatchesURLAndCallDone('frame', 'about:blank'); |
| 20 } |
12 </script> | 21 </script> |
13 </head> | 22 </head> |
14 <body> | 23 <body> |
15 <p>There should be no content in the iframe below:</p> | 24 <p>There should be no content in the iframe below:</p> |
16 <iframe id="frame" onload="checkIfFrameLocationMatchesURLAndCallDone('frame', 'a
bout:blank')" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-inte
rtag.pl?enable-full-block=1&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))
</script>"> | 25 <iframe id="frame" onload="checkframe()" src="http://localhost:8000/security/xss
Auditor/resources/echo-intertag.pl?enable-full-block=1&q=<script>alert(String.fr
omCharCode(0x58,0x53,0x53))</script>"> |
17 </iframe> | 26 </iframe> |
18 </body> | 27 </body> |
19 </html> | 28 </html> |
OLD | NEW |