blob: b9e7d3669b4bc7a03dc4a6fdd291d422d83373f9 [file] [log] [blame]
<!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 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 crossorigin=" anonymous " src="http://localhost:8000/security/resources/cors-script.py?fail=true"></script>
<script src="../../js-test-resources/js-test-post.js"></script>