зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1851099 - Remove dom.media.mediasession.enabled pref r=alwu,geckoview-reviewers,webidl,smaug,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D187347
This commit is contained in:
Родитель
1d467636de
Коммит
e93d3dafd9
|
@ -19,10 +19,7 @@ const videoId = "video";
|
|||
*/
|
||||
add_task(async function setupTestingPref() {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [
|
||||
["dom.media.mediasession.enabled", true],
|
||||
["media.mediacontrol.testingevents.enabled", true],
|
||||
],
|
||||
set: [["media.mediacontrol.testingevents.enabled", true]],
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -8,10 +8,7 @@ const frame2 = "frame2";
|
|||
|
||||
add_task(async function setupTestingPref() {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [
|
||||
["media.mediacontrol.testingevents.enabled", true],
|
||||
["dom.media.mediasession.enabled", true],
|
||||
],
|
||||
set: [["media.mediacontrol.testingevents.enabled", true]],
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -11,10 +11,7 @@ const testVideoId = "video";
|
|||
|
||||
add_task(async function setupTestingPref() {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [
|
||||
["media.mediacontrol.testingevents.enabled", true],
|
||||
["dom.media.mediasession.enabled", true],
|
||||
],
|
||||
set: [["media.mediacontrol.testingevents.enabled", true]],
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -8,10 +8,7 @@ const defaultFaviconName = "defaultFavicon.svg";
|
|||
|
||||
add_task(async function setupTestingPref() {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [
|
||||
["media.mediacontrol.testingevents.enabled", true],
|
||||
["dom.media.mediasession.enabled", true],
|
||||
],
|
||||
set: [["media.mediacontrol.testingevents.enabled", true]],
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -5,10 +5,7 @@ const testVideoId = "video";
|
|||
|
||||
add_task(async function setupTestingPref() {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [
|
||||
["media.mediacontrol.testingevents.enabled", true],
|
||||
["dom.media.mediasession.enabled", true],
|
||||
],
|
||||
set: [["media.mediacontrol.testingevents.enabled", true]],
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -7,10 +7,7 @@ const testVideoId = "video";
|
|||
|
||||
add_task(async function setupTestingPref() {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [
|
||||
["media.mediacontrol.testingevents.enabled", true],
|
||||
["dom.media.mediasession.enabled", true],
|
||||
],
|
||||
set: [["media.mediacontrol.testingevents.enabled", true]],
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -5,10 +5,7 @@ const testVideoId = "video";
|
|||
|
||||
add_task(async function setupTestingPref() {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [
|
||||
["media.mediacontrol.testingevents.enabled", true],
|
||||
["dom.media.mediasession.enabled", true],
|
||||
],
|
||||
set: [["media.mediacontrol.testingevents.enabled", true]],
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -6,10 +6,7 @@ const sDefaultSupportedKeys = ["focus", "play", "pause", "playpause", "stop"];
|
|||
|
||||
add_task(async function setupTestingPref() {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [
|
||||
["media.mediacontrol.testingevents.enabled", true],
|
||||
["dom.media.mediasession.enabled", true],
|
||||
],
|
||||
set: [["media.mediacontrol.testingevents.enabled", true]],
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -8,10 +8,7 @@ const ACTION = "previoustrack";
|
|||
|
||||
add_task(async function setupTestingPref() {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [
|
||||
["dom.media.mediasession.enabled", true],
|
||||
["media.mediacontrol.testingevents.enabled", true],
|
||||
],
|
||||
set: [["media.mediacontrol.testingevents.enabled", true]],
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -23,8 +23,6 @@ const ACTIONS = [
|
|||
];
|
||||
|
||||
(async function testSetActionHandler() {
|
||||
await setupPreference();
|
||||
|
||||
for (const action of ACTIONS) {
|
||||
info(`Test setActionHandler for '${action}'`);
|
||||
generateAction(action);
|
||||
|
@ -46,12 +44,6 @@ const ACTIONS = [
|
|||
SimpleTest.finish();
|
||||
})();
|
||||
|
||||
function setupPreference() {
|
||||
return SpecialPowers.pushPrefEnv({"set": [
|
||||
["dom.media.mediasession.enabled", true],
|
||||
]});
|
||||
}
|
||||
|
||||
function generateAction(action) {
|
||||
let details = generateActionDetails(action);
|
||||
SpecialPowers.wrap(navigator.mediaSession).notifyHandler(details);
|
||||
|
|
|
@ -32,7 +32,6 @@ const testCases = [
|
|||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
SpecialPowers.pushPrefEnv({"set": [
|
||||
["dom.media.mediasession.enabled", true],
|
||||
["media.mediacontrol.testingevents.enabled", true],
|
||||
]}, startTest());
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ enum MediaSessionAction {
|
|||
|
||||
callback MediaSessionActionHandler = undefined(MediaSessionActionDetails details);
|
||||
|
||||
[Exposed=Window, Pref="dom.media.mediasession.enabled"]
|
||||
[Exposed=Window]
|
||||
interface MediaSession {
|
||||
attribute MediaMetadata? metadata;
|
||||
|
||||
|
@ -43,7 +43,7 @@ interface MediaSession {
|
|||
undefined notifyHandler(MediaSessionActionDetails details);
|
||||
};
|
||||
|
||||
[Exposed=Window, Pref="dom.media.mediasession.enabled"]
|
||||
[Exposed=Window]
|
||||
interface MediaMetadata {
|
||||
[Throws]
|
||||
constructor(optional MediaMetadataInit init = {});
|
||||
|
|
|
@ -334,7 +334,7 @@ dictionary ShareData {
|
|||
// https://w3c.github.io/mediasession/#idl-index
|
||||
[Exposed=Window]
|
||||
partial interface Navigator {
|
||||
[Pref="dom.media.mediasession.enabled", SameObject]
|
||||
[SameObject]
|
||||
readonly attribute MediaSession mediaSession;
|
||||
};
|
||||
|
||||
|
|
|
@ -68,7 +68,6 @@ class MediaSessionTest : BaseSessionTest() {
|
|||
sessionRule.setPrefsUntilTestEnd(
|
||||
mapOf(
|
||||
"media.mediacontrol.stopcontrol.aftermediaends" to false,
|
||||
"dom.media.mediasession.enabled" to true,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
|
|
@ -3078,12 +3078,6 @@
|
|||
value: true
|
||||
mirror: always
|
||||
|
||||
# Media Session API
|
||||
- name: dom.media.mediasession.enabled
|
||||
type: bool
|
||||
value: true
|
||||
mirror: always
|
||||
|
||||
# WebCodecs API
|
||||
- name: dom.media.webcodecs.enabled
|
||||
type: RelaxedAtomicBool
|
||||
|
|
Загрузка…
Ссылка в новой задаче