Bug 1601343 - Wrong exception type check in workers/Worker-multi-port.html, r=smaug
authorAndrea Marchesini <amarchesini@mozilla.com>
Wed, 04 Dec 2019 23:11:19 +0000
changeset 505562 c7e0a39fdc1f09e75b755c8287ed0b4e12ff64d2
parent 505561 b4195b31ca936f7e2541c8f4d04aa9744d98443c
child 505563 7e3751388d71a1db2ca7e2227c8bb4455dcd7620
push id102345
push useramarchesini@mozilla.com
push dateWed, 04 Dec 2019 23:12:21 +0000
treeherderautoland@c7e0a39fdc1f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1601343
milestone73.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1601343 - Wrong exception type check in workers/Worker-multi-port.html, r=smaug Differential Revision: https://phabricator.services.mozilla.com/D55838
testing/web-platform/meta/workers/Worker-multi-port.html.ini
testing/web-platform/tests/workers/Worker-multi-port.html
deleted file mode 100644
--- a/testing/web-platform/meta/workers/Worker-multi-port.html.ini
+++ /dev/null
@@ -1,10 +0,0 @@
-[Worker-multi-port.html]
-  [Test postMessage without sequence throws exception]
-    expected: FAIL
-
-  [Test postMessage on channel with previous failed postMessage calls.]
-    expected: FAIL
-
-  [Test postMessage with incorrect ports throws exception]
-    expected: FAIL
-
--- a/testing/web-platform/tests/workers/Worker-multi-port.html
+++ b/testing/web-platform/tests/workers/Worker-multi-port.html
@@ -51,34 +51,34 @@ test(() => {
                                                 [channel.port1, null,
                                                  channel.port2]); },
                 'postMessage with null ports should throw exception.');
 }, 'Test postMessage with null ports throws exception.');
 
 test(() => {
   var worker = new Worker("support/Worker-thread-multi-port.js")
   var channel = new MessageChannel();
-  assert_throws(new TypeError(),
+  assert_throws('DataCloneError',
                 function() { worker.postMessage("notAPort",
                                                 [channel.port1, {},
                                                  channel.port2]); },
                 'postMessage with incorrect ports should throw exception.');
 }, 'Test postMessage with incorrect ports throws exception');
 
 test(() => {
   var worker = new Worker("support/Worker-thread-multi-port.js");
-  assert_throws(new TypeError(),
+  assert_throws('DataCloneError',
                 function() { worker.postMessage("notASequence", [{length: 3}]) },
                 'postMessage without sequence should throw exception.');
 }, 'Test postMessage without sequence throws exception');
 
 async_test(function(t) {
   var worker = new Worker("support/Worker-thread-multi-port.js");
   var channel = new MessageChannel();
-  assert_throws(new TypeError(),
+  assert_throws('DataCloneError',
                 function() { worker.postMessage("notAPort",
                                                 [channel.port1, {},
                                                  channel.port2]); },
                 'postMessage with incorrect ports should throw exception.');
   worker.onmessage = t.step_func_done(function(evt) {
     assert_true(evt.data.startsWith('PASS'));
   });
   worker.postMessage("failed ports", [channel.port1, channel.port2]);