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

Unified Diff: LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-no-cors.html

Issue 954233003: Enable SRI only for same origin and CORS content. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 months 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/subresourceIntegrity/subresource-integrity-script-no-cors.html
diff --git a/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-no-cors.html b/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-no-cors.html
new file mode 100644
index 0000000000000000000000000000000000000000..2fef6ffbb550ac9bc9b633577165397833e0b8a9
--- /dev/null
+++ b/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-no-cors.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<head>
+</head>
+<body>
+ <script src="/js-test-resources/js-test.js"></script>
+ <script>
+ window.jsTestIsAsync = true;
+ description("The test passes if the script loads but also has a console error saying that the specified integrity attribute cannot be enforced because the resource is not CORS enabled.");
+ </script>
+ <script integrity="ni:///sha256;deadbeef" src="http://localhost:8000/security/resources/cors-script.php?credentials=true&cors=false" onload="testPassed('Script ran.');finishJSTest();" onerror="testFailed('Script failed to load script resource.');"></script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698