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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/foreign-fetch-helpers.js

Issue 2032653003: Limit foreign fetch to only intercept requests made from secure contexts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: properly initialize new ResourceRequest member Created 4 years, 6 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 | « third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/foreign-fetch-helper-iframe.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/foreign-fetch-helpers.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/foreign-fetch-helpers.js b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/foreign-fetch-helpers.js
index 42ba7d00d3a199c9ae0c28d96feb3d02f010160c..eae9f4e1255563c6ec4a2996c95946c401f87932 100644
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/foreign-fetch-helpers.js
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/foreign-fetch-helpers.js
@@ -3,8 +3,9 @@
// Installs a service worker on a different origin. Both |worker| and |scope|
// are resolved relative to the /serviceworker/resources/ directory on a
// remote origin.
-function install_cross_origin_worker(t, worker, scope) {
- return with_iframe(get_host_info().HTTPS_REMOTE_ORIGIN +
+function install_cross_origin_worker(
+ t, worker, scope, origin = get_host_info().HTTPS_REMOTE_ORIGIN) {
+ return with_iframe(origin +
'/serviceworker/resources/install-worker-helper.html')
.then(frame => new Promise((resolve, reject) => {
var channel = new MessageChannel();
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/foreign-fetch-helper-iframe.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698