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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/workers/postMessage_ports_readonly_array.htm

Issue 2418853003: Worker: Import "imported/wpt/workers" tests (Retry) (Closed)
Patch Set: rebase Created 4 years, 2 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title> postMessage(): read-only ports array </title>
3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script>
5 <div id=log></div>
6 <script>
7 async_test(function(t) {
8 var channel = new MessageChannel();
9 var targetPort = channel.port2;
10 targetPort.start();
11 targetPort.addEventListener("message", t.step_func_done(function(e) {
12 var channel3 = new MessageChannel();
13 e.ports.push(channel3.port1);
14 e.ports.push(channel3.port1);
15 assert_equals(e.ports.length, 1, "ports is a read only array with length == 1.");
16 }), true);
17 var channel2 = new MessageChannel();
18 channel.port1.postMessage("ports", [channel2.port1]);
19 });
20 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698