Closed Bug 1624702 Opened 1 year ago Closed 1 year ago

Write a Picture-in-Picture toggle behaviour test for the durationchange event

Categories

(Toolkit :: Video/Audio Controls, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 + fixed

People

(Reporter: mconley, Assigned: mconley)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Bug 1622919 landed a change that makes the videocontrols UAWidget re-evaluate displaying the Picture-in-Picture toggle on <video> elements that fire the durationchange event.

We should add a test for this. Originally, this seemed to be difficult to test, since mocking out the duration on a video seemed hard, creating a 45 second video for the test seemed like a waste of space in the repository, and generating a 45 second video dynamically seemed really hard.

One idea is to add a new pref that controls the minimum length of video for showing the toggle, and poking that before the test begins. Then, we could switch the <source> on the video between a shorter and longer video to test the behaviour.

Assignee: nobody → mconley
Status: NEW → ASSIGNED
Attachment #9136807 - Attachment description: Bug 1624702 - Get rid of some dead Picture-in-Picture prefs. r?mstriemer! → Bug 1624702 - Get rid of some dead Picture-in-Picture prefs. r?jaws!
Attachment #9136808 - Attachment description: Bug 1624702 - Add a preference to control the minimum video length for displaying the Picture-in-Picture toggle. r?mstriemer! → Bug 1624702 - Add a preference to control the minimum video length for displaying the Picture-in-Picture toggle. r?jaws!
Attachment #9136809 - Attachment description: Bug 1624702 - Test that the Picture-in-Picture toggle visibility is re-evaluated if the duration of the video changes. r?mstriemer! → Bug 1624702 - Test that the Picture-in-Picture toggle visibility is re-evaluated if the duration of the video changes. r?jaws!
Pushed by malexandru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fe036026a187
Get rid of some dead Picture-in-Picture prefs. r=jaws
https://hg.mozilla.org/integration/autoland/rev/adf32b9c3214
Add a preference to control the minimum video length for displaying the Picture-in-Picture toggle. r=jaws
https://hg.mozilla.org/integration/autoland/rev/cd77dcb0cd4e
Test that the Picture-in-Picture toggle visibility is re-evaluated if the duration of the video changes. r=jaws

Tracking+ due to the test permafails in bug 1626948 fixed by this.

You need to log in before you can comment on or make changes to this bug.