diff --git a/lib/internal/worker/io.js b/lib/internal/worker/io.js index 6f4348f11d2ddb..a7bc2b0d20c2e2 100644 --- a/lib/internal/worker/io.js +++ b/lib/internal/worker/io.js @@ -491,7 +491,7 @@ class BroadcastChannel extends EventTarget { if (arguments.length === 0) throw new ERR_MISSING_ARGS('message'); if (this[kHandle] === undefined) - throw new DOMException('BroadcastChannel is closed.'); + throw new DOMException('BroadcastChannel is closed.', 'InvalidStateError'); if (this[kHandle].postMessage(message) === undefined) throw new DOMException('Message could not be posted.'); } diff --git a/test/wpt/status/webmessaging/broadcastchannel.json b/test/wpt/status/webmessaging/broadcastchannel.json index b6ee1b6e0db194..340b9955f33fe3 100644 --- a/test/wpt/status/webmessaging/broadcastchannel.json +++ b/test/wpt/status/webmessaging/broadcastchannel.json @@ -10,14 +10,6 @@ ] } }, - "interface.any.js": { - "fail": { - "expected": [ - "postMessage after close should throw", - "postMessage should throw InvalidStateError after close, even with uncloneable data" - ] - } - }, "origin.window.js": { "fail": { "expected": [