Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(760)

Unified Diff: LayoutTests/http/tests/security/script-onerror-crossorigin-same-origin.html

Issue 47923008: Block execution of failed 'crossorigin' <script>s. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/security/script-onerror-crossorigin-same-origin.html
diff --git a/LayoutTests/http/tests/security/script-onerror-crossorigin-cors.html b/LayoutTests/http/tests/security/script-onerror-crossorigin-same-origin.html
similarity index 52%
copy from LayoutTests/http/tests/security/script-onerror-crossorigin-cors.html
copy to LayoutTests/http/tests/security/script-onerror-crossorigin-same-origin.html
index dc86a91aee983ecb740122997d5992a84701fc0e..2968214e2e7a781c5b3285a5d7fb0d59ab5746fe 100644
--- a/LayoutTests/http/tests/security/script-onerror-crossorigin-cors.html
+++ b/LayoutTests/http/tests/security/script-onerror-crossorigin-same-origin.html
@@ -2,10 +2,10 @@
<head>
</head>
<body>
- <script src="../../js-test-resources/js-test.js"></script>
+ <script src="/js-test-resources/js-test.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.");
+ description("The test passes if 'window.onerror' is invoked with unsanitized information on a script loaded with a 'crossorigin' attribute, but loads from same-origin and without valid CORS headers.");
window.onerror = function(msg, url, line, column, error) {
window.msg = msg;
@@ -14,13 +14,13 @@
window.column = column;
window.errorObject = error;
shouldBeTrue("/SomeError/.test(msg)");
- shouldBeEqualToString("url", "http://localhost:8000/security/resources/cors-script.php?fail=true&cors=true");
+ shouldBeEqualToString("url", "http://127.0.0.1:8000/security/resources/cors-script.php?fail=true&cors=false");
shouldBe("line", "1");
shouldBe("column", "1");
shouldNotBe("window.errorObject", "null");
finishJSTest();
}
</script>
- <script crossorigin="anonymous" src="http://localhost:8000/security/resources/cors-script.php?fail=true&cors=true"></script>
+ <script crossorigin="anonymous" src="resources/cors-script.php?fail=true&cors=false"></script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698