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

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

Issue 238993003: ServiceWorker: "minimal" end-to-end sample as a W3C test (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add 'parsed' to observed states Created 6 years, 8 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/end-to-end-worker.js
diff --git a/LayoutTests/http/tests/serviceworker/resources/end-to-end-worker.js b/LayoutTests/http/tests/serviceworker/resources/end-to-end-worker.js
new file mode 100644
index 0000000000000000000000000000000000000000..0a269cd200fa8f25265978dc9842d42dd803e266
--- /dev/null
+++ b/LayoutTests/http/tests/serviceworker/resources/end-to-end-worker.js
@@ -0,0 +1,7 @@
+onmessage = function(e) {
+ var message = e.data;
+ if (typeof message === 'object' && 'port' in message) {
+ var response = 'Ack for: ' + message.from;
+ message.port.postMessage(response);
+ }
+};

Powered by Google App Engine
This is Rietveld 408576698