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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/install-worker-helper.html

Issue 2676733002: Upstream foreign fetch tests. (Closed)
Patch Set: rebase Created 3 years, 10 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/install-worker-helper.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/install-worker-helper.html b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/install-worker-helper.html
similarity index 79%
rename from third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/install-worker-helper.html
rename to third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/install-worker-helper.html
index 1de9baffb756e809e3b6378d58cb02ff4aeb94a3..fcb8f6d83c7e0e4b3a0b97ed29ca5add248d091e 100644
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/install-worker-helper.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/install-worker-helper.html
@@ -1,8 +1,7 @@
<!DOCTYPE html>
-<script src="test-helpers.js"></script>
+<script src="test-helpers.sub.js"></script>
<script>
window.addEventListener('message', event => {
- var port = event.ports[0];
navigator.serviceWorker.getRegistration(event.data.options.scope)
.then(r => {
if (r) return r.unregister();
@@ -16,7 +15,7 @@ window.addEventListener('message', event => {
if (worker.state === 'activated') resolve();
});
}))
- .then(() => port.postMessage('success'))
- .catch((e) => port.postMessage('failure:' + e));
+ .then(() => event.source.postMessage('success', '*'))
+ .catch((e) => event.source.postMessage('failure:' + e, '*'));
});
</script>

Powered by Google App Engine
This is Rietveld 408576698