Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9589e0808401278e9602cabd0cd575c7cc903e13
      
https://github.com/WebKit/WebKit/commit/9589e0808401278e9602cabd0cd575c7cc903e13
  Author: Jean-Yves Avenard <[email protected]>
  Date:   2026-08-11 (Tue, 11 Aug 2026)

  Changed paths:
    M LayoutTests/media/video-concurrent-playback-expected.txt
    M LayoutTests/media/video-concurrent-playback.html

  Log Message:
  -----------
  [site-isolation] media/video-concurrent-playback.html is an intermittent 
failure
https://bugs.webkit.org/show_bug.cgi?id=321503
rdar://184607025

Reviewed by Eric Carlson.

The test starts a second video while a first one is playing, with
ConcurrentPlaybackNotPermitted set, and expects the first to be paused. It
asserted that from the second element's 'playing' handler. With site isolation
enabled it read videos[0].paused as false: the 'playing' event is queued during
play(), while enforceConcurrentPlaybackRestriction() runs in the UI process and
the pause reaches the web process as ClientShouldSuspendPlayback, at least one
IPC round trip later. Without site isolation the enforcement ran inside play()
itself, before the queued event, so the assertion held.

Asserting from the first element's 'pause' handler instead was not enough: the
second element's 'playing' is only queued during play() when its readyState is
at least HAVE_FUTURE_DATA, and otherwise arrives from a later readyState change,
so its order against that pause varies. On a stress bot the event came after the
pause, and endTest() had already ended the test, so the logged output lost the
line.

The test now records the second element's 'playing' and the first element's
'pause' as they arrive and asserts once it has both, in either order. That event
is required but no longer logged, so the output is the same whichever order they
come in, and a 'playing' that never arrives fails through failTestIn(500) rather
than passing unnoticed. The handler keys off evt.target rather than counting
events, so it identifies the second element rather than "not the first". The
100ms setTimeout(endTest) is gone with it: it used to end the test with no
assertions at all when the pause was late, reporting success.

* LayoutTests/media/video-concurrent-playback-expected.txt:
* LayoutTests/media/video-concurrent-playback.html:

Canonical link: https://commits.webkit.org/319001@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to