diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2021-05-22 18:08:24 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2021-05-23 15:16:42 +0200 |
commit | af1546391c4a561eb26ccf9cd244b05aed9b5bfc (patch) | |
tree | 6c3a07150dd2dc4a3ea712c21c74585e6bca0bab /cli/tests/workers/broadcast_channel.ts | |
parent | 8cf7f966f24d0fb996b41d92b04ad9647337a8f6 (diff) |
feat(extensions): BroadcastChannel WPT conformance
Replaces the file-backed provider by an in-memory one because proper
file locking is a hard problem that detracts from the proof of concept.
Teach the WPT runner how to extract tests from .html files because all
the relevant tests in test_util/wpt/webmessaging/broadcastchannel are
inside basics.html and interface.html.
Diffstat (limited to 'cli/tests/workers/broadcast_channel.ts')
-rw-r--r-- | cli/tests/workers/broadcast_channel.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cli/tests/workers/broadcast_channel.ts b/cli/tests/workers/broadcast_channel.ts new file mode 100644 index 000000000..5076e9eb7 --- /dev/null +++ b/cli/tests/workers/broadcast_channel.ts @@ -0,0 +1,5 @@ +new BroadcastChannel("intercom").onmessage = function (e) { + this.postMessage(e.data); +}; + +self.postMessage("go"); |