| Index: LayoutTests/http/tests/security/script-onerror-crossorigin-cors.html
|
| diff --git a/LayoutTests/http/tests/security/script-onerror-crossorigin-cors.html b/LayoutTests/http/tests/security/script-onerror-crossorigin-cors.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b7021fecb267419a8cc7127cddbf927a970e2c14
|
| --- /dev/null
|
| +++ b/LayoutTests/http/tests/security/script-onerror-crossorigin-cors.html
|
| @@ -0,0 +1,23 @@
|
| +<!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 an exception thrown in a script loaded with a 'crossorigin' attribute, and delivered with valid CORS headers.");
|
| +
|
| + window.onerror = function(msg, url, line) {
|
| + window.msg = msg;
|
| + window.url = url;
|
| + window.line = line;
|
| + shouldBeEqualToString("msg.match(/SomeError/)[0]", "SomeError");
|
| + shouldBeEqualToString("url", "http://localhost:8000/security/resources/cors-script.php?fail=true&cors=true");
|
| + shouldBe("line", "1");
|
| + finishJSTest();
|
| + }
|
| + </script>
|
| + <script crossorigin="anonymous" src="http://localhost:8000/security/resources/cors-script.php?fail=true&cors=true"></script>
|
| + <script src="../../js-test-resources/js-test-post.js"></script>
|
| +</body>
|
| +</html>
|
|
|