Closed
Bug 1421518
Opened 7 years ago
Closed 7 years ago
Add an automation test for new autoplay policy
Categories
(Core :: Audio/Video: Playback, enhancement, P3)
Tracking
()
RESOLVED
FIXED
mozilla59
Tracking | Status | |
---|---|---|
firefox59 | --- | fixed |
People
(Reporter: alwu, Assigned: alwu)
References
Details
Attachments
(1 file)
Will add a chrome-browser test to ensure the play() can start or fail on different user-gestures scenario.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Updated•7 years ago
|
Priority: -- → P3
Comment 3•7 years ago
|
||
mozreview-review |
Comment on attachment 8932724 [details] Bug 1421518 - add user-gestures test for the autoplay policy. https://reviewboard.mozilla.org/r/203774/#review210432 ::: toolkit/content/tests/browser/browser_autoplay_policy_user_gestures.js:59 (Diff revision 2) > + info("- can't autoplay without user activation -"); > + await canplayPromise; > + ok(video.paused, "video can't start without user input."); > + > + info("- call play() without user activation -"); > + await video.play().catch(function() { You don't need 'await' if you want to call .then() or .catch() on a promise. ::: toolkit/content/tests/browser/browser_autoplay_policy_user_gestures.js:84 (Diff revision 2) > + info("- can't autoplay without user activation -"); > + await canplayPromise; > + ok(video.paused, "video can't start without user input."); > + > + info("- call play() without user activation -"); > + await video.play().catch(function() { This test is already done in test_play_without_user_gesture(). You don't need to duplicate the test here.
Attachment #8932724 -
Flags: review?(jwwang) → review+
Assignee | ||
Comment 4•7 years ago
|
||
mozreview-review |
Comment on attachment 8932724 [details] Bug 1421518 - add user-gestures test for the autoplay policy. https://reviewboard.mozilla.org/r/203774/#review210450 ::: toolkit/content/tests/browser/browser_autoplay_policy_user_gestures.js:59 (Diff revision 2) > + info("- can't autoplay without user activation -"); > + await canplayPromise; > + ok(video.paused, "video can't start without user input."); > + > + info("- call play() without user activation -"); > + await video.play().catch(function() { That awit is used to keep the code running in correct sequence. If you remove it, the catch might be executed after removeTab().
Comment hidden (mozreview-request) |
Assignee | ||
Comment 6•7 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=4a6334c3f8b9df90721e60ab6fd53c71fc19d88e
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 9•7 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=4ac66f1d827a003402810a674e389f707846b36b&selectedJob=149482855
Comment 10•7 years ago
|
||
Pushed by alwu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/213ae1ab70d4 add user-gestures test for the autoplay policy. r=jwwang
Comment 11•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/213ae1ab70d4
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in
before you can comment on or make changes to this bug.
Description
•