| Index: LayoutTests/http/tests/security/script-onerror-no-crossorigin-no-cors.html
|
| diff --git a/LayoutTests/http/tests/security/script-onerror-no-crossorigin-no-cors.html b/LayoutTests/http/tests/security/script-onerror-no-crossorigin-no-cors.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..324360b2e46406c5524443ad8810986de7228263
|
| --- /dev/null
|
| +++ b/LayoutTests/http/tests/security/script-onerror-no-crossorigin-no-cors.html
|
| @@ -0,0 +1,27 @@
|
| +<!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 sanitized information about an exception thrown in a script loaded without a 'crossorigin' attribute, and delivered without valid CORS headers.");
|
| +
|
| + window.onerror = function(msg, url, line, column, error) {
|
| + window.msg = msg;
|
| + window.url = url;
|
| + window.line = line;
|
| + window.column = column;
|
| + window.errorObject = error;
|
| + shouldBeEqualToString("msg", "Script error.");
|
| + shouldBeEqualToString("url", "");
|
| + shouldBe("line", "0");
|
| + shouldBe("column", "0");
|
| + shouldBeNull("window.errorObject");
|
| + finishJSTest();
|
| + }
|
| + </script>
|
| + <script src="http://localhost:8000/security/resources/cors-script.php?fail=true&cors=false"></script>
|
| + <script src="../../js-test-resources/js-test-post.js"></script>
|
| +</body>
|
| +</html>
|
|
|