blob: aac49d033e58b73937a027a4e36fcc9665fad2f3 [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.php?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.php?fail=true"></script>
<script src="../../js-test-resources/js-test-post.js"></script>