summaryrefslogtreecommitdiffstats
path: root/dom/messagechannel/tests/sharedWorker2_messageChannel.js
diff options
context:
space:
mode:
Diffstat (limited to 'dom/messagechannel/tests/sharedWorker2_messageChannel.js')
-rw-r--r--dom/messagechannel/tests/sharedWorker2_messageChannel.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/dom/messagechannel/tests/sharedWorker2_messageChannel.js b/dom/messagechannel/tests/sharedWorker2_messageChannel.js
new file mode 100644
index 0000000000..6b1280bd6c
--- /dev/null
+++ b/dom/messagechannel/tests/sharedWorker2_messageChannel.js
@@ -0,0 +1,7 @@
+var mc = new MessageChannel();
+var i = 0;
+
+onconnect = function(evt) {
+ dump("CONNECTING: " + i + "\n");
+ evt.ports[0].postMessage(42, [mc["port" + ++i]]);
+};