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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/client-id-worker.js

Issue 2778903002: Upstream service worker `client` tests to WPT (Closed)
Patch Set: Remove unnecessary branch Created 3 years, 9 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/client-id-worker.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/client-id-worker.js b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/client-id-worker.js
deleted file mode 100644
index ec71b3458b7214fc7675f6f75997cc82a47cac82..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/client-id-worker.js
+++ /dev/null
@@ -1,27 +0,0 @@
-self.onmessage = function(e) {
- var port = e.data.port;
- var message = [];
-
- var promise = Promise.resolve()
- .then(function() {
- // 1st matchAll()
- return self.clients.matchAll().then(function(clients) {
- clients.forEach(function(client) {
- message.push(client.id);
- });
- });
- })
- .then(function() {
- // 2nd matchAll()
- return self.clients.matchAll().then(function(clients) {
- clients.forEach(function(client) {
- message.push(client.id);
- });
- });
- })
- .then(function() {
- // Send an array containing ids of clients from 1st and 2nd matchAll()
- port.postMessage(message);
- });
- e.waitUntil(promise);
-};

Powered by Google App Engine
This is Rietveld 408576698