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

Side by Side Diff: LayoutTests/http/tests/serviceworker/postmessage-worker.js

Issue 231513003: Convert Service Worker layout tests to W3C testharness-style tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review feedback 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 var port;
2
3 // Exercise the 'onmessage' handler:
4 self.onmessage = function(e) {
5 var message = e.data;
6 if ('port' in message) {
7 port = message.port;
8 }
9 };
10
11 // And an event listener:
12 self.addEventListener('message', function(e) {
13 var message = e.data;
14 if ('value' in message) {
15 port.postMessage("Acking value: " + message.value);
16 } else if ('done' in message) {
17 port.postMessage("quit");
18 }
19 });
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/serviceworker/postmessage-expected.txt ('k') | LayoutTests/http/tests/serviceworker/registration.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698