This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The test has: try { postMessage(1, null); } catch(e) { postMessage(''+e); } and asserts that 1 is posted. But the spec for postMessage is: void postMessage(any message, optional sequence<Transferable> transfer); and passing null to the second argument of that should throw, per webidl. I recommend we do three things: 1) Add a copy of this test that replaces the first postMessage line with: postMessage(1); 2) Add a copy of this test that replaces the first postMessage line with: postMessage(1, undefined); 3) Modify this test to check that postMessage(1, null) in fact throws. #1 and #2 would test correct handling of the optional argument when it's not actually passed and #3 would test correct handling of null here.
Test http://w3c-test.org/web-platform-tests/master/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null.html Spec http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#dedicatedworkerglobalscope I think the spec was correct when it was written because it predates transferables, but obviously it should be fixed. I think #3 since the test is explicitly about testing null in the second argument.
My 3 suggestions were not mutually exclusive. I didn't say "one of three things", right? We should do all three, with different test names for 1 and 2, obviously.
Oh, OK, sure. I think #1 is probably tested already somewhere.
Moving this bug report to Github as Issue 491 https://github.com/w3c/web-platform-tests/issues/491