Bug 855064 - Remove DASH references in media unit tests r=cpearce

This commit is contained in:
Steve Workman 2013-04-02 17:05:00 -07:00
Родитель 483e060c17
Коммит d5bd61fa94
5 изменённых файлов: 5 добавлений и 36 удалений

Просмотреть файл

@ -17,8 +17,7 @@ var types = {
ogv: "video/ogg",
oga: "audio/ogg",
webm: "video/webm",
wav: "audio/x-wav",
mpd: "application/dash+xml"
wav: "audio/x-wav"
};
// Return file with name as per the query string with access control

Просмотреть файл

@ -13,8 +13,6 @@ var gSmallTests = [
{ name:"seek.webm", type:"video/webm", width:320, height:240, duration:3.966 },
{ name:"detodos.opus", type:"audio/ogg; codecs=opus", duration:2.9135 },
{ name:"gizmo.mp4", type:"video/mp4", duration:5.56 },
{ name:"dash-manifest.mpd", type:"application/dash+xml",
width:320, height:180, duration:3.966 },
{ name:"bogus.duh", type:"bogus/duh" }
];
@ -27,7 +25,6 @@ var gProgressTests = [
{ name:"320x240.ogv", type:"video/ogg", width:320, height:240, duration:0.266, size:28942 },
{ name:"seek.webm", type:"video/webm", duration:3.966, size:215529 },
{ name:"gizmo.mp4", type:"video/mp4", duration:5.56, size:383631 },
{ name:"dash-manifest.mpd", type:"application/dash+xml", duration:3.966 },
{ name:"bogus.duh", type:"bogus/duh" }
];
@ -39,7 +36,6 @@ var gPlayedTests = [
{ name:"seek.webm", type:"video/webm", duration:3.966 },
{ name:"gizmo.mp4", type:"video/mp4", duration:5.56 },
{ name:"owl.mp3", type:"audio/mpeg", duration:3.29 },
{ name:"dash-manifest.mpd", type:"application/dash+xml", duration:3.966 },
];
// Used by test_mozLoadFrom. Need one test file per decoder backend, plus
@ -163,9 +159,6 @@ var gPlayTests = [
{ name:"small-shot.mp3", type:"audio/mpeg", duration:0.27 },
{ name:"owl.mp3", type:"audio/mpeg", duration:3.29 },
// DASH WebM MPD
{ name:"dash-manifest.mpd", type:"application/dash+xml", duration:3.966 },
// Invalid file
{ name:"bogus.duh", type:"bogus/duh", duration:Number.NaN }
];
@ -195,13 +188,6 @@ var gInvalidTests = [
{ name:"invalid-cmap-s1c2.opus", type:"audio/ogg; codecs=opus"},
];
// Files to test for stream switching. Note: media files referenced in DASH MPD
// files should be accessed via dash_detect_stream_switch.sjs.
var gStreamSwitchTests = [
{ name:"dash-manifest-sjs.mpd", type:"application/dash+xml",
width:320, height:180, duration:3.966 }
];
// Converts a path/filename to a file:// URI which we can load from disk.
// Optionally checks whether the file actually exists on disk at the location
// we've specified.
@ -267,12 +253,6 @@ var gInfoLeakTests = [
}, {
type: 'video/webm',
src: fileUriToSrc("tests/content/media/test/404.webm", false),
}, {
type: 'application/dash+xml',
src: fileUriToSrc("tests/content/media/test/dash-manifest.mpd", true),
}, {
type: 'application/dash+xml',
src: fileUriToSrc("tests/content/media/test/404.mpd", false),
}, {
type: 'video/ogg',
src: 'http://localhost/404.ogv',
@ -282,9 +262,6 @@ var gInfoLeakTests = [
}, {
type: 'video/webm',
src: 'http://localhost/404.webm',
}, {
type: 'application/dash+xml',
src: 'http://localhost/404.mpd',
}, {
type: 'video/ogg',
src: 'http://example.com/tests/content/media/test/test_info_leak.html'
@ -324,7 +301,6 @@ var gSeekTests = [
{ name:"detodos.opus", type:"audio/ogg; codecs=opus", duration:2.9135 },
{ name:"gizmo.mp4", type:"video/mp4", duration:5.56 },
{ name:"owl.mp3", type:"audio/mpeg", duration:3.29 },
{ name:"dash-manifest.mpd", type:"application/dash+xml", duration:3.966 },
{ name:"bogus.duh", type:"bogus/duh", duration:123 }
];
@ -357,8 +333,6 @@ var gDecodeErrorTests = [
// Invalid files
{ name:"bogus.wav", type:"audio/x-wav" },
{ name:"bogus.ogv", type:"video/ogg" },
{ name:"dash-manifest-garbled.mpd", type:"application/dash+xml" },
{ name:"dash-manifest-garbled-webm.mpd", type:"application/dash+xml" },
{ name:"bogus.duh", type:"bogus/duh" }
];
@ -505,7 +479,7 @@ function checkMetadata(msg, e, test) {
// installed video backends.
function getPlayableVideo(candidates) {
var v = document.createElement("video");
var resources = candidates.filter(function(x){return (/^video/.test(x.type) || /^application\/dash\+xml/.test(x.type)) && v.canPlayType(x.type);});
var resources = candidates.filter(function(x){return /^video/.test(x.type) && v.canPlayType(x.type);});
if (resources.length > 0)
return resources[0];
return null;
@ -521,7 +495,7 @@ function getPlayableAudio(candidates) {
// Returns the type of element that should be created for the given mimetype.
function getMajorMimeType(mimetype) {
if (/^video/.test(mimetype) || /^application\/dash\+xml/.test(mimetype)) {
if (/^video/.test(mimetype)) {
return "video";
} else {
return "audio";

Просмотреть файл

@ -39,8 +39,7 @@ var extension = {
"audio/x-wav": "wav",
"video/ogg" : "ogv",
"audio/ogg" : "oga",
"video/webm" : "webm",
"application/dash+xml" : "mpd"
"video/webm" : "webm"
};
function startTest(test, token) {

Просмотреть файл

@ -47,7 +47,7 @@ function loadedMetadata(evt) {
for (var i=0; i<gSmallTests.length; ++i) {
var test = gSmallTests[i];
var type;
if (/^video/.test(test.type) || /^application\/dash\+xml/.test(test.type)) {
if (/^video/.test(test.type)) {
type = "video"
} else {
type = "audio";

Просмотреть файл

@ -57,9 +57,6 @@ v1.addEventListener('loadeddata', loaded, false);
a1.addEventListener('loadeddata', loaded, false);
var videoSource = newSource(/^video/);
if (videoSource == null) {
videoSource = newSource(/^application\/dash\+xml/);
}
if (videoSource) {
v1.appendChild(videoSource);
v1.load();