OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <head> |
| 3 </head> |
| 4 <body> |
| 5 <script src="../../js-test-resources/js-test-pre.js"></script> |
| 6 <script> |
| 7 window.jsTestIsAsync = true; |
| 8 description("The test passes if 'window.onerror' gets sanitized informat
ion about an exception thrown in a script loaded with a 'crossorigin' attribute,
and delivered without valid CORS headers."); |
| 9 |
| 10 window.onerror = function(msg, url, line) { |
| 11 window.msg = msg; |
| 12 window.url = url; |
| 13 window.line = line; |
| 14 shouldBeNull("msg.match(/SomeError/)"); |
| 15 shouldBeEqualToString("url", ""); |
| 16 shouldBe("line", "0"); |
| 17 finishJSTest(); |
| 18 } |
| 19 </script> |
| 20 <script crossorigin="anonymous" src="http://localhost:8000/security/resource
s/cors-script.php?fail=true&cors=false"></script> |
| 21 <script src="../../js-test-resources/js-test-post.js"></script> |
| 22 </body> |
| 23 </html> |
OLD | NEW |