| 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 window.jsTestIsAsync = true; | 8 window.jsTestIsAsync = true; |
| 9 | 9 |
| 10 function checkReferer() { | 10 function checkReferer() { |
| 11 window.frame = document.querySelector('iframe'); | 11 window.frame = document.querySelector('iframe'); |
| 12 shouldThrow('frame.contentDocument'); | 12 shouldThrow('frame.contentDocument'); |
| 13 finishJSTest(); | 13 finishJSTest(); |
| 14 } | 14 } |
| 15 | 15 |
| 16 window.onload = function () { | 16 window.onload = function () { |
| 17 var i = document.querySelector('iframe'); | 17 var i = document.querySelector('iframe'); |
| 18 i.onload = checkReferer; | 18 i.onload = checkReferer; |
| 19 i.src = 'http://localhost:8000/security/xssAuditor/resources/redir.p
hp?url=http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?enab
le-full-block=1%26q=<script>alert(String.fromCharCode(0x58,0x53,0x53))<' + '/scr
ipt>'; | 19 i.src = 'http://localhost:8000/security/xssAuditor/resources/redir.p
hp?url=http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?enab
le-full-block=1%26q=<script>alert(String.fromCharCode(0x58,0x53,0x53))<' + '/scr
ipt>'; |
| 20 }; | 20 }; |
| 21 </script> | 21 </script> |
| 22 </head> | 22 </head> |
| 23 <body> | 23 <body> |
| 24 <iframe></iframe> | 24 <iframe></iframe> |
| 25 </body> | 25 </body> |
| 26 </html> | 26 </html> |
| OLD | NEW |