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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/fetch-request-css-cross-origin-mime-check-worker.js

Issue 1861243002: Check the mime type of cross-origin CSS fetched via the Service Worker. (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
Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/fetch-request-css-cross-origin-mime-check-worker.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/fetch-request-css-cross-origin-mime-check-worker.js b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/fetch-request-css-cross-origin-mime-check-worker.js
new file mode 100644
index 0000000000000000000000000000000000000000..d5ad75cb899f7ee8f4b119f90a1a5e5401be1c02
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/fetch-request-css-cross-origin-mime-check-worker.js
@@ -0,0 +1,11 @@
+importScripts('../../resources/get-host-info.js');
+importScripts('test-helpers.js');
+
+self.addEventListener('fetch', function(event) {
+ if (event.request.url.indexOf('dummy.css') != -1) {
+ event.respondWith(fetch(
+ get_host_info()['HTTP_REMOTE_ORIGIN'] + base_path() +
+ 'fetch-request-css-cross-origin-mime-check-secret.html',
+ {mode: 'no-cors'}));
+ }
+ });

Powered by Google App Engine
This is Rietveld 408576698