| <!DOCTYPE html> |
| <head> |
| </head> |
| <body> |
| <script src="../../js-test-resources/js-test-pre.js"></script> |
| <script> |
| window.jsTestIsAsync = true; |
| description("The test passes if window.onerror gets unsanitized information about the module script error."); |
| |
| window.onerror = function(msg, url, line, column, error) { |
| window.msg = msg; |
| window.url = url; |
| window.line = line; |
| window.column = column; |
| window.error = error; |
| shouldBeEqualToString("msg.match(/SomeError/)[0]", "SomeError"); |
| shouldBeEqualToString("url", "http://localhost:8000/security/resources/cors-script.py?fail=true"); |
| shouldBe("line", "1"); |
| shouldBe("column", "52"); |
| shouldBeEqualToString("error.toString()", "SomeError"); |
| finishJSTest(); |
| } |
| </script> |
| <script type="module" crossorigin=" anonymous " src="http://localhost:8000/security/resources/cors-script.py?fail=true"></script> |
| <script src="../../js-test-resources/js-test-post.js"></script> |