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

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

Issue 729923004: Add some tests to make sure message ports properly queue up message. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@cross_process_messaging_with_terminate
Patch Set: fix FIXMEs Created 6 years 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 | « LayoutTests/http/tests/serviceworker/chromium/resources/postmessage-port-worker.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/serviceworker/chromium/resources/postmessage-worker.js
diff --git a/LayoutTests/http/tests/serviceworker/chromium/resources/postmessage-cross-process-worker.js b/LayoutTests/http/tests/serviceworker/chromium/resources/postmessage-worker.js
similarity index 51%
copy from LayoutTests/http/tests/serviceworker/chromium/resources/postmessage-cross-process-worker.js
copy to LayoutTests/http/tests/serviceworker/chromium/resources/postmessage-worker.js
index 3b60019713b6073830a800178d2a7022ffb9d362..847333bfe3636c6895d6803c05cf3571fb6a8f98 100644
--- a/LayoutTests/http/tests/serviceworker/chromium/resources/postmessage-cross-process-worker.js
+++ b/LayoutTests/http/tests/serviceworker/chromium/resources/postmessage-worker.js
@@ -1,24 +1,10 @@
var port;
-var resultport = null;
-var result = null;
-
-function send_result_if_ready() {
- if (resultport && result) {
- resultport.postMessage(result);
- }
-}
self.onmessage = function(e) {
var message = e.data;
if ('port' in message) {
port = message.port;
port.onmessage = on_message;
- } else if ('done' in message) {
- result = message.done;
- send_result_if_ready();
- } else if ('resultport' in message) {
- resultport = message.resultport;
- send_result_if_ready();
}
};
« no previous file with comments | « LayoutTests/http/tests/serviceworker/chromium/resources/postmessage-port-worker.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698