Closed Bug 2094849 Opened 11 days ago Closed 8 days ago

[wpt-sync] Sync PR 65007 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=329641

Categories

(Core :: Audio/Video: Playback, task, P4)

task

Tracking

()

RESOLVED FIXED
163 Branch
Tracking Status
firefox163 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 65007 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/65007
Details from upstream follow.

Jean-Yves Avenard <jya@apple.com> wrote:

WebKit export of https://bugs.webkit.org/show_bug.cgi?id=329641

WebKit export from bug: [<!---->MMS]<!----> Add ManagedMediaSource wpt

<pre>
Add WPT tests for ManagedMediaSource

web-platform-tests had no tests covering the ManagedMediaSource,
ManagedSourceBuffer and BufferedChangeEvent behaviours defined in the Media
Source Extensions specification. The existing WebKit tests for these rely on
internals, mock media or WebKit-specific policies (AirPlay, eviction
thresholds), and so cannot be upstreamed.

Add tests under media-source/managed and media-source/dedicated-worker/managed,
intended to be exported to WPT, covering:

  • ManagedMediaSource construction, the initial streaming value and event
    handlers, and addSourceBuffer() returning a ManagedSourceBuffer.
  • The BufferedChangeEvent constructor. Constructing one without both
    addedRanges and removedRanges is not tested, see
    <a href="https://github.com/w3c/media-source/issues/370.">https://github.com/w3c/media-source/issues/370.</a>
  • bufferedchange after appendBuffer(), remove() and endOfStream(), with
    addedRanges and removedRanges matching the change in buffered, and no event
    when buffered is unchanged.
  • startstreaming and endstreaming firing as the streaming attribute changes,
    including on detach.
  • ManagedMediaSource used from a dedicated worker.

mediasource-addsourcebuffer.html now also checks that MediaSource.addSourceBuffer()
does not return a ManagedSourceBuffer.

The managed tests do not depend on MediaSource being exposed, so they are enabled on
iOS, where only ManagedMediaSource is available. The worker test is marked as
failing on GStreamer ports, as MSE in workers requires a thread-safe
MediaSource implementation.

Detaching a streaming ManagedMediaSource fired sourceclose before endstreaming,
while the specification's detach steps queue endstreaming first.
MediaSource::detachFromElement() set the readyState to "closed", which queues
sourceclose, before calling elementDetached(), which queues endstreaming. This
happened on every detach of a streaming ManagedMediaSource. elementDetached() is
now called before the readyState changes.

WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=329641">https://bugs.webkit.org/show_bug.cgi?id=329641</a>
WebKit-Canonical-Link: <a href="https://commits.webkit.org/326242@main">https://commits.webkit.org/326242@main</a>
</pre>

Component: web-platform-tests → Audio/Video: Playback
Product: Testing → Core

CI Results

Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 9 tests and 11 subtests

Status Summary

Firefox

OK : 9
PASS: 11
FAIL: 23

Chrome

OK : 9
PASS: 10
FAIL: 24

Safari

OK : 9
PASS: 33
FAIL: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /media-source/dedicated-worker/managed/mediasource-manager-worker-play.html [wpt.fyi]
    • ManagedMediaSource constructed in a dedicated worker fires startstreaming and bufferedchange, and plays: FAIL (Chrome: FAIL, Safari: PASS)
  • /media-source/managed/mediasource-manager-bufferedchange-append.html [wpt.fyi]
    • appendBuffer() fires bufferedchange reporting the added ranges: FAIL (Chrome: FAIL, Safari: PASS)
    • appendBuffer() of an adjacent segment reports only the newly added range: FAIL (Chrome: FAIL, Safari: PASS)
    • appendBuffer() that does not change buffered does not fire bufferedchange: FAIL (Chrome: FAIL, Safari: PASS)
    • Appending an initialization segment alone does not fire bufferedchange: FAIL (Chrome: FAIL, Safari: PASS)
  • /media-source/managed/mediasource-manager-bufferedchange-endofstream.html [wpt.fyi]
    • endOfStream() that changes buffered fires bufferedchange: FAIL (Chrome: FAIL, Safari: PASS)
    • endOfStream() that does not change buffered does not fire bufferedchange: FAIL (Chrome: FAIL, Safari: PASS)
  • /media-source/managed/mediasource-manager-bufferedchange-remove.html [wpt.fyi]
    • remove() of part of the buffered data fires bufferedchange reporting the removed range: FAIL (Chrome: FAIL, Safari: PASS)
    • remove() of all buffered data fires bufferedchange reporting all ranges as removed: FAIL (Chrome: FAIL, Safari: PASS)
    • remove() of an unbuffered range does not fire bufferedchange: FAIL (Chrome: FAIL, Safari: PASS)
  • /media-source/managed/mediasource-manager-bufferedchangeevent-constructor.html [wpt.fyi]
    • BufferedChangeEvent constructed with empty ranges: FAIL (Chrome: FAIL, Safari: PASS)
    • BufferedChangeEvent constructor honours EventInit members: FAIL (Chrome: FAIL, Safari: PASS)
    • BufferedChangeEvent attributes are [SameObject]: FAIL (Chrome: FAIL, Safari: PASS)
    • BufferedChangeEvent constructor rejects non-TimeRanges members: FAIL (Chrome: FAIL, Safari: PASS)
    • BufferedChangeEvent constructed with non-empty ranges reports them: FAIL (Chrome: FAIL, Safari: PASS)
  • /media-source/managed/mediasource-manager-interfaces.html [wpt.fyi]
    • ManagedMediaSource construction: FAIL (Chrome: FAIL, Safari: PASS)
    • ManagedMediaSource streaming attribute is initially false: FAIL (Chrome: FAIL, Safari: PASS)
    • ManagedMediaSource event handlers are initially null: FAIL (Chrome: FAIL, Safari: PASS)
    • ManagedMediaSource.addSourceBuffer() returns a ManagedSourceBuffer: FAIL (Chrome: FAIL, Safari: PASS)
  • /media-source/managed/mediasource-manager-streaming-detach.html [wpt.fyi]
    • Detaching a streaming ManagedMediaSource sets streaming to false and fires endstreaming before sourceclose: FAIL (Chrome: FAIL, Safari: FAIL)
    • Detaching a ManagedMediaSource that is not streaming does not fire endstreaming: FAIL (Chrome: FAIL, Safari: PASS)
  • /media-source/managed/mediasource-manager-streaming.html [wpt.fyi]
    • startstreaming fires once a ManagedMediaSource with no data is attached: FAIL (Chrome: FAIL, Safari: PASS)
    • endstreaming fires once all data is buffered, and startstreaming once it is removed: FAIL (Chrome: FAIL, Safari: PASS)
Status: NEW → RESOLVED
Closed: 8 days ago
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch
You need to log in before you can comment on or make changes to this bug.