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

Unified Diff: LayoutTests/http/tests/serviceworker/resources/postmessage-to-client-worker.js

Issue 264233003: Add blink-side binding code and tests for ServiceWorker -> Document postMessage (3/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: added comment about targetOrigin Created 6 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: LayoutTests/http/tests/serviceworker/resources/postmessage-to-client-worker.js
diff --git a/LayoutTests/http/tests/serviceworker/resources/postmessage-to-client-worker.js b/LayoutTests/http/tests/serviceworker/resources/postmessage-to-client-worker.js
new file mode 100644
index 0000000000000000000000000000000000000000..2cc5e5dbc73611f2d649f717810b623ef0aadd2b
--- /dev/null
+++ b/LayoutTests/http/tests/serviceworker/resources/postmessage-to-client-worker.js
@@ -0,0 +1,10 @@
+var values = [];
+
+self.onmessage = function(e) {
+ self.clients.getServiced().then(function(clients) {
+ clients.forEach(function(client) {
+ client.postMessage('Sending message via clients');
+ client.postMessage('quit');
+ });
+ });
+};

Powered by Google App Engine
This is Rietveld 408576698