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

Unified Diff: LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-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: Rebase on ToT Created 5 years, 9 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-cors.html
diff --git a/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-cors.html b/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-cors.html
new file mode 100644
index 0000000000000000000000000000000000000000..4998cf2b965401eb6e9954ceecc92d86365fe574
--- /dev/null
+++ b/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-cors.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<head>
+</head>
+<body>
+ <script src="/js-test-resources/js-test.js"></script>
+ <script>
+ var result = false;
+ var scriptLoaded = function() {
+ if (result)
+ testPassed('Script ran.');
+ else
+ testFailed('Script did not run.');
+ finishJSTest();
+ };
+
+ window.jsTestIsAsync = true;
+ description("The test passes if the script loads without any console error messages.");
Mike West 2015/03/06 03:17:09 Instead of this style, would you mind rewriting th
jww 2015/03/06 08:24:21 That works in this case, but in the other tests we
Mike West 2015/03/06 09:07:52 If you want to test the error message, then yes, y
jww 2015/03/09 22:07:45 Yeah, I was hoping there was some test-mode-only A
+ </script>
+ <script crossorigin="anonymous" integrity="ni:///sha256;eQJgT9bQ7qIxOoZ_I0Ohtpn3EDFGHP2hqHAWogCoOtU=" src="http://localhost:8000/security/resources/cors-script.php?value=true" onload="scriptLoaded();"></script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698