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

Unified Diff: LayoutTests/http/tests/serviceworker/chromium/resources/stashed-ports-echo-worker.js

Issue 1063533002: Initial implementation of stashed message ports, layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@stashed-ports
Patch Set: address comments Created 5 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
« no previous file with comments | « no previous file | LayoutTests/http/tests/serviceworker/chromium/stashed-ports-after-terminate.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/serviceworker/chromium/resources/stashed-ports-echo-worker.js
diff --git a/LayoutTests/http/tests/serviceworker/chromium/resources/stashed-ports-echo-worker.js b/LayoutTests/http/tests/serviceworker/chromium/resources/stashed-ports-echo-worker.js
new file mode 100644
index 0000000000000000000000000000000000000000..f54a5d2f7cd2eb399e5ff77863c458b288cbe73f
--- /dev/null
+++ b/LayoutTests/http/tests/serviceworker/chromium/resources/stashed-ports-echo-worker.js
@@ -0,0 +1,8 @@
+
+self.onmessage = function(e) {
+ var port = self.ports.add(e.data.name, e.data.port);
+};
+
+self.ports.onmessage = function(e) {
+ e.source.postMessage({name: e.source.name, data: e.data});
+};
« no previous file with comments | « no previous file | LayoutTests/http/tests/serviceworker/chromium/stashed-ports-after-terminate.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698