Closed Bug 1561268 Opened 5 months ago Closed 5 months ago

mediacapture-streams/MediaStreamTrack-end-manual.https.html is not spec compliant

Categories

(Core :: WebRTC: Audio/Video, defect, P3)

67 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: pehrsons, Assigned: pehrsons)

References

()

Details

Attachments

(2 files)

We are failing the MST-end-manual WPT because it's wrong.

It's instructions are:

  • When prompted, accept to share your video and audio stream, and then revoke that permission.

Doing this we fail with this error:

assert_equals: Audio track has been ended as expected expected "ended" but got "live"

vidTrack.onended<@https://w3c-test.org/mediacapture-streams/MediaStreamTrack-end-manual.https.html:29:9
Test.prototype.step@https://w3c-test.org/resources/testharness.js:1594:25
Test.prototype.step_func/<@https://w3c-test.org/resources/testharness.js:1618:35

But the spec says:

When a MediaStreamTrack track ends for any reason other than the stop() method being invoked, the User Agent MUST queue a task that runs the following steps:

  1. If the track's readyState attribute has the value ended already, then abort these steps.
  2. Set track's readyState attribute to ended.
  3. Notify track's source that track is ended so that the source may be stopped, unless other MediaStreamTrack objects depend on it.
  4. Fire a simple event named ended at the object.

Basically, when the test receives the "ended" event for the video track, it assumes that the audio track has already ended. But there's no such ordering guarantee in the spec. Since it's a manual test, the user might even be revoking the permission per-track, in the other order, depending on the UA.

Pushed by pehrsons@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/55bdeb5e17ea
Modernize MST-end-manual.https.html. r=jib
https://hg.mozilla.org/integration/autoland/rev/ed8e702696ab
Make MST-end-manual.https.html spec compliant. r=jib
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/17706 for changes under testing/web-platform/tests
Upstream PR merged
You need to log in before you can comment on or make changes to this bug.