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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/preload/preload-csp.html

Issue 1867493002: Fix font preload crash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/DocumentLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/preload/preload-csp.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/preload/preload-csp.html b/third_party/WebKit/LayoutTests/http/tests/preload/preload-csp.html
new file mode 100644
index 0000000000000000000000000000000000000000..7a06d81fc4f8b71b88fefc70f61695dde0748c82
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/preload/preload-csp.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<meta http-equiv="Content-Security-Policy" content="font-src 'none'">
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script>
+ var t = async_test('Makes sure that preload requests respect CSP');
+</script>
+<link rel=preload href="../resources/Ahem.ttf" as=font crossorigin>
+<script src="../resources/slow-script.pl?delay=200"></script>
+<script>
+ window.onload = t.step(function(){
+ var entries = performance.getEntriesByName(new URL("../resources/Ahem.ttf", location.href).href);
+ assert_equals(entries.length, 0);
+ t.done();
+ });
+</script>
+
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/DocumentLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698