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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/postmessage-to-client-worker.js

Issue 2875383002: Upstream service worker `postMessage` tests 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/postmessage-to-client-worker.js
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/postmessage-to-client-worker.js b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/postmessage-to-client-worker.js
index 290a4a9b3e9d9263645b4154eae151e2b06b3eae..17913063583a8276675adcc65a66e843d83a303f 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/postmessage-to-client-worker.js
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/postmessage-to-client-worker.js
@@ -1,10 +1,10 @@
self.onmessage = function(e) {
- self.clients.matchAll().then(function(clients) {
+ e.waitUntil(self.clients.matchAll().then(function(clients) {
clients.forEach(function(client) {
client.postMessage('Sending message via clients');
if (!Array.isArray(clients))
client.postMessage('clients is not an array');
client.postMessage('quit');
});
- });
+ }));
};

Powered by Google App Engine
This is Rietveld 408576698