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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-preload-blocked.html

Issue 1632523002: `<link rel=preload>` with no `as` should be subject to connect-src (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit tests Created 4 years, 11 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: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-preload-blocked.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-preload-blocked.html b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-preload-blocked.html
new file mode 100644
index 0000000000000000000000000000000000000000..efd3cf04b40adf5a9f851d3b2720d3bcef4c15ea
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-preload-blocked.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="Content-Security-Policy" content="connect-src http://foobar.test:8000; script-src http://127.0.0.1:8000 'unsafe-inline'">
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<link rel=preload href="../../resources/dummy.js" id=preload>
+<script>
+ var t = async_test('Makes sure that connect-src allows link preload resources with no as type');
+ var preload = document.getElementById("preload");
+ preload.onerror = t.step(function(){
+ t.done();
+ });
+</script>
+</head>
+<body>

Powered by Google App Engine
This is Rietveld 408576698