Bug 1736292 [wpt PR 31290] - BroadcastChannel: Add WPTs for detached iframes, closed...
commitb0f5eb47929e0be722fa57a80ac13a8dbe580d48
authorAndrew Williams <awillia@google.com>
Thu, 28 Oct 2021 10:30:00 +0000 (28 10:30 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Fri, 29 Oct 2021 10:24:55 +0000 (29 10:24 +0000)
treee1af9f0c237c2e94362169b32d4743a96eced850
parentc3ea4b1c70fd390bcae0ce9a9f5d07f6ea0ce3b0
Bug 1736292 [wpt PR 31290] - BroadcastChannel: Add WPTs for detached iframes, closed workers, a=testonly

Automatic update from web-platform-tests
BroadcastChannel: Add WPTs for detached iframes, closed workers

This CL adds tentative WPTs that test whether BroadcastChannels in
detached iframes and closed workers behave according to proposed
changes to the specification. For more details, see:

https://github.com/whatwg/html/issues/7219

Note that the WPT CI found the existing closing/re-opening test
(and two of the new tests) to be flaky in Chrome. From
investigating further it seems there's a race condition when
instantiating and sending BroadcastChannel messages between
a worker and its parent such that using postMessage from either
side to indicate BroadcastChannel readiness is insufficient.
This CL also adds extra logic to mitigate this in the existing
test case (and the new ones). For more info, see:

https://github.com/whatwg/html/issues/7267

Bug: 1239274
Change-Id: Ia014e412a2dc8267aac57041672835fb90994d89
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3229181
Commit-Queue: Andrew Williams <awillia@google.com>
Reviewed-by: Ben Kelly <wanderview@chromium.org>
Cr-Commit-Position: refs/heads/main@{#935672}

--

wpt-commits: de06181503dc24462beb8b1e5cf750ce382c27cf
wpt-pr: 31290
testing/web-platform/tests/webmessaging/broadcastchannel/detached-iframe.tentative.html [new file with mode: 0644]
testing/web-platform/tests/webmessaging/broadcastchannel/resources/service-worker.js
testing/web-platform/tests/webmessaging/broadcastchannel/resources/worker.js
testing/web-platform/tests/webmessaging/broadcastchannel/workers.html
testing/web-platform/tests/webmessaging/broadcastchannel/workers.tentative.html [new file with mode: 0644]