Closed
Bug 1611021
Opened 6 years ago
Closed 6 years ago
Add content testing API to simulate media control key events
Categories
(Core :: Audio/Video: Playback, task, P2)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
FIXED
mozilla74
Tracking | Status | |
---|---|---|
firefox74 | --- | fixed |
People
(Reporter: alwu, Assigned: alwu)
References
Details
Attachments
(2 files)
Although we already have ChromeUtils.generateMediaControlKeysTestEvent()
which can be used to generate events, but that can only be used in the scope with chrome privilege.
We would like to have a testing API which can be used easily in mochitest without having privilege.
Assignee | ||
Comment 1•6 years ago
|
||
It allows us to simulate media control key events in non-privileged context, such as a mochitest running in content process.
Assignee | ||
Comment 2•6 years ago
|
||
It allows us to share the same event name when write testing code like following,
const action = "previoustrack";
mediaSession.setActionHandler(action, () => { ... });
specialPower.generateMediaControlKeyTestEvent(action);
Updated•6 years ago
|
Attachment #9122537 -
Attachment description: Bug 1611021 - part2 : align some of events' name in MediaControlKeysTestEvent with MediaSessionAction's action name. → Bug 1611021 - part2 : align some event names in MediaControlKeysTestEvent with MediaSessionAction's action name.
Pushed by alwu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/18140597bc1b
part1 : add a method in special power to generate media control key events. r=bzbarsky
https://hg.mozilla.org/integration/autoland/rev/4255fea71217
part2 : align some event names in MediaControlKeysTestEvent with MediaSessionAction's action name. r=bzbarsky
Comment 4•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/18140597bc1b
https://hg.mozilla.org/mozilla-central/rev/4255fea71217
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox74:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
You need to log in
before you can comment on or make changes to this bug.
Description
•