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

Unified Diff: third_party/WebKit/LayoutTests/broadcastchannel/resources/worker.js

Issue 2004643002: Implement BroadcastChannel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/broadcastchannel/resources/worker.js
diff --git a/third_party/WebKit/LayoutTests/broadcastchannel/resources/worker.js b/third_party/WebKit/LayoutTests/broadcastchannel/resources/worker.js
new file mode 100644
index 0000000000000000000000000000000000000000..2ea6a8c7e0ec6a7ce309cd1e1381ccaeb9fdb352
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/broadcastchannel/resources/worker.js
@@ -0,0 +1,12 @@
+
+onmessage = e => {
+ console.log(e);
+ let c = new BroadcastChannel(e.data.channel);
+ let messages = [];
+ c.onmessage = e => {
+ messages.push(e.data);
+ if (e.data == 'done')
+ postMessage(messages);
+ };
+ c.postMessage('from worker');
+};

Powered by Google App Engine
This is Rietveld 408576698