Bug 1159756. Stop forcing the media.mediasource.enabled preference to true and the media.mediasource.whitelist preference to false in the test harness. r=kinetik

This commit is contained in:
Boris Zbarsky 2015-04-30 14:25:03 -04:00
parent 6a1cad60ac
commit 0c57b3bfed
50 changed files with 104 additions and 9 deletions

View File

@ -16,7 +16,13 @@ function runWithMSE(testFunction) {
testFunction(ms, el);
}
addLoadEvent(bootstrapTest);
addLoadEvent(function () {
SpecialPowers.pushPrefEnv({"set": [
[ "media.mediasource.enabled", true ],
[ "media.mediasource.whitelist", false ],
]},
bootstrapTest);
});
}
function fetchWithXHR(uri, onLoadFunction) {

View File

@ -22,6 +22,7 @@ function test() {
SpecialPowers.pushPrefEnv({"set":
[
["media.mediasource.enabled", false],
["media.mediasource.whitelist", false],
]
},
test);

View File

@ -387,6 +387,8 @@ function SetupEME(test, token, params)
function SetupEMEPref(callback) {
var prefs = [
[ "media.mediasource.enabled", true ],
[ "media.mediasource.whitelist", false ],
[ "media.fragmented-mp4.exposed", true ],
];
@ -399,4 +401,4 @@ function SetupEMEPref(callback) {
}
SpecialPowers.pushPrefEnv({ "set" : prefs }, callback);
}
}

View File

@ -50,7 +50,14 @@ function test() {
});
}
addLoadEvent(test);
addLoadEvent(function() {
SpecialPowers.pushPrefEnv({"set":
[
["media.mediasource.enabled", true],
["media.mediasource.whitelist", false],
]
}, test);
});
</script>
</pre>
</body>

View File

@ -28,6 +28,7 @@ addLoadEvent(function() {
SpecialPowers.pushPrefEnv({"set":
[
["media.mediasource.enabled", false],
["media.mediasource.whitelist", false],
]
}, test);
});

View File

@ -685,7 +685,7 @@ var interfaceNamesInGlobalScope =
// IMPORTANT: Do not change this list without review from a DOM peer!
"MediaRecorder",
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "MediaSource", pref: "media.mediasource.enabled"},
{name: "MediaSource", desktop: true, linux: false, release: false},
// IMPORTANT: Do not change this list without review from a DOM peer!
"MediaStream",
// IMPORTANT: Do not change this list without review from a DOM peer!
@ -929,9 +929,9 @@ var interfaceNamesInGlobalScope =
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "SimpleTest", xbl: false},
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "SourceBuffer", pref: "media.mediasource.enabled"},
{name: "SourceBuffer", desktop: true, linux: false, release: false},
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "SourceBufferList", pref: "media.mediasource.enabled"},
{name: "SourceBufferList", desktop: true, linux: false, release: false},
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "SpeechSynthesisEvent", b2g: true},
// IMPORTANT: Do not change this list without review from a DOM peer!
@ -1289,7 +1289,7 @@ var interfaceNamesInGlobalScope =
// IMPORTANT: Do not change this list without review from a DOM peer!
"ValidityState",
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "VideoPlaybackQuality", pref: "media.mediasource.enabled"},
{name: "VideoPlaybackQuality", desktop: true, linux: false, release: false},
// IMPORTANT: Do not change this list without review from a DOM peer!
"VideoStreamTrack",
// IMPORTANT: Do not change this list without review from a DOM peer!
@ -1391,6 +1391,9 @@ function createInterfaceMap(isXBLScope) {
var isRelease = !version.includes("a");
var isDesktop = !/Mobile|Tablet/.test(navigator.userAgent);
var isB2G = !isDesktop && !navigator.userAgent.includes("Android");
var isMac = /Mac OS/.test(navigator.oscpu);
var isWindows = /Windows/.test(navigator.oscpu);
var isLinux = /Linux/.test(navigator.oscpu);
var isAndroid = navigator.userAgent.includes("Android");
var hasPermission = function (aPermissions) {
var result = false;
@ -1411,6 +1414,9 @@ function createInterfaceMap(isXBLScope) {
(entry.xbl === !isXBLScope) ||
(entry.desktop === !isDesktop) ||
(entry.b2g === !isB2G) ||
(entry.windows === !isWindows) ||
(entry.mac === !isMac) ||
(entry.linux === !isLinux) ||
(entry.android === !isAndroid) ||
(entry.release === !isRelease) ||
(entry.pref && !prefs.getBoolPref(entry.pref)) ||

View File

@ -165,8 +165,6 @@ user_pref("layout.css.unicode-range.enabled", true);
user_pref("layout.spammy_warnings.enabled", false);
// Enable Media Source Extensions for testing
user_pref("media.mediasource.enabled", true);
user_pref("media.mediasource.whitelist", false);
user_pref("media.mediasource.mp4.enabled", true);
user_pref("media.mediasource.webm.enabled", true);

View File

@ -1,5 +1,6 @@
[SourceBuffer-abort-readyState.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]
[SourceBuffer#abort() (video/mp4) : If the readyState attribute of the parent media source is not in the "open" state then throw an INVALID_STATE_ERR exception and abort these steps.]
expected:
if not debug and (os == "win") and (version == "5.1.2600") and (processor == "x86") and (bits == 32): FAIL

View File

@ -1,5 +1,6 @@
[SourceBuffer-abort-removed.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]
[SourceBuffer#abort (video/mp4) : if this object has been removed from the sourceBuffers attribute of the parent media source, then throw an INVALID_STATE_ERR exception and abort these steps.]
expected:
if not debug and (os == "win") and (version == "5.1.2600") and (processor == "x86") and (bits == 32): FAIL

View File

@ -1,5 +1,6 @@
[SourceBuffer-abort-updating.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]
[SourceBuffer#abort() (video/mp4) : Check the algorithm when the updating attribute is true.]
expected:
if not debug and (os == "win") and (version == "5.1.2600") and (processor == "x86") and (bits == 32): FAIL

View File

@ -1,5 +1,6 @@
[SourceBuffer-abort.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]
[SourceBuffer#abort() (video/mp4): Check the values of appendWindowStart and appendWindowEnd.]
expected:
if not debug and (os == "win") and (version == "5.1.2600") and (processor == "x86") and (bits == 32): FAIL

View File

@ -0,0 +1,4 @@
[URL-createObjectURL-revoke.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]

View File

@ -1,5 +1,6 @@
[URL-createObjectURL.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]
[URL.createObjectURL(mediaSource) should return a unique Blob URI.]
expected: FAIL

View File

@ -1,5 +1,6 @@
[interfaces.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]
[AudioTrack interface: attribute kind]
expected: FAIL

View File

@ -1,5 +1,6 @@
[mediasource-addsourcebuffer.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]
[Test addSourceBuffer() with AAC and H.264]
expected:
if os == "linux": FAIL

View File

@ -1,5 +1,6 @@
[mediasource-append-buffer.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]
disabled:
if (os == "win") and (version != "5.1.2600"): https://bugzilla.mozilla.org/show_bug.cgi?id=1143650
if os == "mac": https://bugzilla.mozilla.org/show_bug.cgi?id=1143650

View File

@ -0,0 +1,3 @@
[mediasource-appendwindow.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]

View File

@ -1,5 +1,6 @@
[mediasource-buffered.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]
[Demuxed content with different lengths]
expected:
if os == "linux": FAIL

View File

@ -0,0 +1,3 @@
[mediasource-closed.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]

View File

@ -1,3 +1,4 @@
[mediasource-config-change-mp4-a-bitrate.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1130973

View File

@ -1,5 +1,6 @@
[mediasource-config-change-mp4-av-audio-bitrate.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]
[Tests mp4 audio bitrate changes in multiplexed content.]
expected:
if os == "linux": FAIL

View File

@ -1,5 +1,6 @@
[mediasource-config-change-mp4-av-framesize.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]
[Tests mp4 frame size changes in multiplexed content.]
expected:
if os == "linux": FAIL

View File

@ -1,5 +1,6 @@
[mediasource-config-change-mp4-av-video-bitrate.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]
[Tests mp4 video bitrate changes in multiplexed content.]
expected:
if os == "linux": FAIL

View File

@ -1,5 +1,6 @@
[mediasource-config-change-mp4-v-bitrate.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]
[Tests mp4 video-only bitrate changes.]
expected:
if os == "linux": FAIL

View File

@ -1,5 +1,6 @@
[mediasource-config-change-mp4-v-framerate.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]
[Tests mp4 video-only frame rate changes.]
expected:
if os == "linux": FAIL

View File

@ -1,5 +1,6 @@
[mediasource-config-change-mp4-v-framesize.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]
[Tests mp4 video-only frame size changes.]
expected:
if os == "linux": FAIL

View File

@ -1,3 +1,4 @@
[mediasource-config-change-webm-a-bitrate.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1134888

View File

@ -0,0 +1,3 @@
[mediasource-config-change-webm-av-audio-bitrate.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]

View File

@ -0,0 +1,3 @@
[mediasource-config-change-webm-av-framesize.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]

View File

@ -0,0 +1,3 @@
[mediasource-config-change-webm-av-video-bitrate.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]

View File

@ -0,0 +1,3 @@
[mediasource-config-change-webm-v-bitrate.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]

View File

@ -0,0 +1,3 @@
[mediasource-config-change-webm-v-framerate.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]

View File

@ -0,0 +1,3 @@
[mediasource-config-change-webm-v-framesize.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]

View File

@ -0,0 +1,3 @@
[mediasource-duration-boundaryconditions.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]

View File

@ -1,5 +1,6 @@
[mediasource-duration.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]
[Test seek starts on duration truncation below currentTime]
expected:
if (os == "win") and (version != "5.1.2600"): PASS

View File

@ -0,0 +1,3 @@
[mediasource-endofstream-invaliderror.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]

View File

@ -1,3 +1,4 @@
[mediasource-getvideoplaybackquality.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1066467

View File

@ -1,5 +1,6 @@
[mediasource-is-type-supported.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]
[Test invalid MIME format "video/webm"]
expected: FAIL

View File

@ -0,0 +1,3 @@
[mediasource-multiple-attach.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]

View File

@ -1,3 +1,4 @@
[mediasource-play-then-seek-back.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1128069

View File

@ -1,3 +1,4 @@
[mediasource-play.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1066467

View File

@ -1,5 +1,6 @@
[mediasource-redundant-seek.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]
expected:
if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): TIMEOUT
if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): TIMEOUT

View File

@ -1,5 +1,6 @@
[mediasource-remove.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]
[Test removing all appended data.]
expected: FAIL

View File

@ -0,0 +1,3 @@
[mediasource-removesourcebuffer.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]

View File

@ -1,5 +1,6 @@
[mediasource-seek-beyond-duration.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1093945
[Test seeking beyond updated media duration.]
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1093945

View File

@ -1,5 +1,6 @@
[mediasource-seek-during-pending-seek.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1093945
[Test seeking to a new location before transitioning beyond HAVE_METADATA.]
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1093945

View File

@ -1,5 +1,6 @@
[mediasource-sequencemode-append-buffer.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]
[Test sequence AppendMode appendBuffer(first media segment)]
expected: FAIL

View File

@ -1,5 +1,6 @@
[mediasource-sourcebuffer-mode.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]
[Test setting SourceBuffer.mode]
expected: FAIL

View File

@ -0,0 +1,3 @@
[mediasource-sourcebufferlist.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]

View File

@ -0,0 +1,3 @@
[mediasource-timestamp-offset.html]
type: testharness
prefs: [media.mediasource.enabled:true, media.mediasource.whitelist:false]