OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="/js-test-resources/js-test-pre.js"></script> | 4 <script src="/js-test-resources/js-test.js"></script> |
5 <script> | 5 <script> |
6 if (window.testRunner) | 6 if (window.testRunner) |
7 testRunner.setXSSAuditorEnabled(true); | 7 testRunner.setXSSAuditorEnabled(true); |
8 | 8 |
9 window.jsTestIsAsync = true; | 9 window.jsTestIsAsync = true; |
10 | 10 |
11 function checkFrames() { | 11 function checkFrames() { |
12 shouldThrow('xssed.contentDocument'); | 12 shouldThrow('xssed.contentDocument'); |
13 shouldThrow('xssed.contentWindow.location.href'); | 13 shouldThrow('xssed.contentWindow.location.href'); |
14 finishJSTest(); | 14 finishJSTest(); |
15 } | 15 } |
16 | 16 |
17 var xssed; | 17 var xssed; |
18 var crossorigin; | 18 var crossorigin; |
19 window.onload = function () { | 19 window.onload = function () { |
20 xssed = document.getElementById('xssed'); | 20 xssed = document.getElementById('xssed'); |
21 crossorigin = document.getElementById('crossorigin'); | 21 crossorigin = document.getElementById('crossorigin'); |
22 xssed.onload = checkFrames; | 22 xssed.onload = checkFrames; |
23 xssed.src = 'http://localhost:8000/security/xssAuditor/resources/ech
o-intertag.pl?enable-full-block=1&q=<script>alert(String.fromCharCode(0x58,0x53,
0x53));<' + '/script>'; | 23 xssed.src = 'http://localhost:8000/security/xssAuditor/resources/ech
o-intertag.pl?enable-full-block=1&q=<script>alert(String.fromCharCode(0x58,0x53,
0x53));<' + '/script>'; |
24 }; | 24 }; |
25 </script> | 25 </script> |
26 </head> | 26 </head> |
27 <body> | 27 <body> |
28 <iframe id='xssed'></iframe> | 28 <iframe id='xssed'></iframe> |
29 <iframe id='crossorigin' src='http://localhost:8000/security/resources/innoc
ent-victim.html'></iframe> | 29 <iframe id='crossorigin' src='http://localhost:8000/security/resources/innoc
ent-victim.html'></iframe> |
30 </body> | 30 </body> |
31 </html> | 31 </html> |
OLD | NEW |