[webkit-changes] [WebKit/WebKit] 95c4d7: REGRESSION(262173 at main): [ macOS WK2 ] media/media...

Jean-Yves Avenard noreply at github.com
Thu Aug 17 18:35:22 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 95c4d7e41e125140741c04cb4b85bf46f094d48a
      https://github.com/WebKit/WebKit/commit/95c4d7e41e125140741c04cb4b85bf46f094d48a
  Author: Jean-Yves Avenard <jya at apple.com>
  Date:   2023-08-17 (Thu, 17 Aug 2023)

  Changed paths:
    M LayoutTests/media/media-source/media-source-duplicate-seeked-expected.txt
    M LayoutTests/media/media-source/media-source-duplicate-seeked.html
    M LayoutTests/platform/mac-gpup/TestExpectations
    M LayoutTests/platform/mac-wk2/TestExpectations

  Log Message:
  -----------
  REGRESSION(262173 at main): [ macOS WK2 ] media/media-source/media-source-duplicate-seeked.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=259699
rdar://113221970

Reviewed by Jer Noble.

The test was non-deterministic/invalid.

It adds 1s of video element (using the MockSourceBuffer) and set the duration to 1s.
It then seeks `currentTime = 1` which is the end of the video and then
calls play() again once the `seeked` event has fired.

However, per spec, if the playback has reached the end of the video and you call `play()`

https://html.spec.whatwg.org/multipage/media.html#internal-play-steps
"If the playback has ended and the direction of playback is forwards, seek to the earliest possible position of the media resource."

so we seek again.

The flow of the test was as follow:
1- Load 1s of data
2- set duration to 1s
3- call endOfStream
3- seek to 1s
4- seek completes -> `seeked` event is fired.
5- `ended` event is fired
5- call play(), we are at the end of the element, we seek to the start -> `seeked` event is fired,
6- playback continue and now reaches the end -> `ended` event is fired.

So we have the `ended` event fired twice, but the test expect `ended` to
be fired before `seeked` which is only true if the listener of the first `ended` event hasn't run.

Not seeking to the end of the video at the start of the test, but slightly
before would keep the aim of the test, but not caused `ended` event to be
fired twice as we will only reach the end if the media is playing.

* LayoutTests/media/media-source/media-source-duplicate-seeked-expected.txt:
* LayoutTests/media/media-source/media-source-duplicate-seeked.html:
* LayoutTests/platform/mac-gpup/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:

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




More information about the webkit-changes mailing list