Open Bug 1371158 Opened 8 years ago Updated 3 years ago

Add tests that test changing from one mediasource src to another one

Categories

(Core :: Audio/Video: Playback, enhancement, P3)

53 Branch
enhancement

Tracking

()

People

(Reporter: bzbarsky, Unassigned)

References

Details

In bug 1365092 we ended up with a patch that accidentally did the DoLoad() call in HTMLMediaElement on attribute change before updating mSrcMediaSource to the new value. This passed all existing tests, which means we probably need some additional test coverage here. To reproduce the buggy patch in a tree with bug 1365092 fixed, just move the AfterMaybeChangeAttr() call to the beginning of HTMLMediaElement::AfterSetAttr, so it happens before we update mSrcMediaSource. Karl, do you have any idea how to write a test for this?
Flags: needinfo?(karlt)
No longer blocks: 1365092
Depends on: 1365092
DoLoad() doesn't actually do the load but resets any existing load and queues a task to select the resource when in stable state. mSrcMediaSource is not used until selected the resource, and so the ordering issues regarding DoLoad() and mSrcMediaSource modification raised in https://bugzilla.mozilla.org/show_bug.cgi?id=1365092#c59 are not observable. That makes this bug as reported wontfix. If there are really no tests changing mediasource, then we should have one, but I suspect one already exists. Re "DoLoad() on UnsetAttr", https://html.spec.whatwg.org/multipage/media.html#attr-media-src says "If a src attribute of a media element is set or changed, the user agent must invoke the media element's media element load algorithm. (Removing the src attribute does not do this, even if there are source elements present.)" If no tests failed in that situation, then we are missing a test, but that's probably a low priority test. I'll leave this for the media playback team to triage.
Flags: needinfo?(karlt)
Component: Audio/Video → Audio/Video: Playback
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.