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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/fetch-request-html-imports-worker.js

Issue 2858093002: Upstream service worker `fetch` test to WPT (Closed)
Patch Set: Incorporate review feedback Created 3 years, 7 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/external/wpt/service-workers/service-worker/resources/fetch-request-html-imports-worker.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/fetch-request-html-imports-worker.js b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/fetch-request-html-imports-worker.js
similarity index 61%
rename from third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/fetch-request-html-imports-worker.js
rename to third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/fetch-request-html-imports-worker.js
index 20942113741989b56f61f15d7bd9a1f56baa3ff5..5525d526866af8a9941031d0bc54621b2c6d62bf 100644
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/fetch-request-html-imports-worker.js
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/fetch-request-html-imports-worker.js
@@ -1,4 +1,4 @@
-importScripts('../../resources/get-host-info.js');
+importScripts('/common/get-host-info.sub.js');
var host_info = get_host_info();
self.addEventListener('fetch', function(event) {
@@ -8,21 +8,21 @@ self.addEventListener('fetch', function(event) {
}
var result = 'mode=' + event.request.mode +
' credentials=' + event.request.credentials;
- if (url == host_info.HTTP_ORIGIN + '/dummy-dir/same.html') {
+ if (url == host_info.HTTPS_ORIGIN + '/dummy-dir/same.html') {
event.respondWith(new Response(
result +
'<link id="same-same" rel="import" ' +
- 'href="' + host_info.HTTP_ORIGIN + '/dummy-dir/same-same.html">' +
+ 'href="' + host_info.HTTPS_ORIGIN + '/dummy-dir/same-same.html">' +
'<link id="same-other" rel="import" ' +
- ' href="' + host_info.HTTP_REMOTE_ORIGIN +
+ ' href="' + host_info.HTTPS_REMOTE_ORIGIN +
'/dummy-dir/same-other.html">'));
- } else if (url == host_info.HTTP_REMOTE_ORIGIN + '/dummy-dir/other.html') {
+ } else if (url == host_info.HTTPS_REMOTE_ORIGIN + '/dummy-dir/other.html') {
event.respondWith(new Response(
result +
'<link id="other-same" rel="import" ' +
- ' href="' + host_info.HTTP_ORIGIN + '/dummy-dir/other-same.html">' +
+ ' href="' + host_info.HTTPS_ORIGIN + '/dummy-dir/other-same.html">' +
'<link id="other-other" rel="import" ' +
- ' href="' + host_info.HTTP_REMOTE_ORIGIN +
+ ' href="' + host_info.HTTPS_REMOTE_ORIGIN +
'/dummy-dir/other-other.html">'));
} else {
event.respondWith(new Response(result));

Powered by Google App Engine
This is Rietveld 408576698