mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 792935 - Add DASH to test_info_leak, test_progress and test_standalone r=cpearce
This commit is contained in:
parent
3a059a192c
commit
4cbdb73f1a
@ -6380,6 +6380,16 @@ nsContentUtils::FindInternalContentViewer(const char* aType,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_DASH
|
||||
if (DecoderTraits::IsDASHMPDType(nsDependentCString(aType))) {
|
||||
docFactory = do_GetService("@mozilla.org/content/document-loader-factory;1");
|
||||
if (docFactory && aLoaderType) {
|
||||
*aLoaderType = TYPE_CONTENT;
|
||||
}
|
||||
return docFactory.forget();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_GSTREAMER
|
||||
if (DecoderTraits::IsGStreamerSupportedType(nsDependentCString(aType))) {
|
||||
docFactory = do_GetService("@mozilla.org/content/document-loader-factory;1");
|
||||
|
@ -27,6 +27,7 @@ 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" }
|
||||
];
|
||||
|
||||
@ -255,6 +256,12 @@ 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',
|
||||
@ -264,6 +271,9 @@ 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'
|
||||
|
@ -81,7 +81,7 @@ function listener(evt) {
|
||||
}
|
||||
|
||||
function createMedia(type, src, token) {
|
||||
var tag = /^video/.test(type) ? "video" : "audio";
|
||||
var tag = getMajorMimeType(test.type);
|
||||
var v = document.createElement(tag);
|
||||
for (var i=0; i<gEventTypes.length; i++) {
|
||||
v.addEventListener(gEventTypes[i], listener, false);
|
||||
|
@ -50,7 +50,7 @@ function createTestArray() {
|
||||
}
|
||||
|
||||
function startTest(test, token) {
|
||||
var elemType = /^audio/.test(test.type) ? "audio" : "video";
|
||||
var elemType = getMajorMimeType(test.type);
|
||||
var element = document.createElement(elemType);
|
||||
element.src = test.name;
|
||||
element.token = token;
|
||||
|
@ -18,8 +18,8 @@ for (var i=0; i<gSmallTests.length; ++i) {
|
||||
|
||||
// We can't play WAV files in stand alone documents, so just don't
|
||||
// run the test on non-video content types.
|
||||
var isVideo = /^video/.test(test.type) ? true : false;
|
||||
if (!isVideo || !document.createElement("video").canPlayType(test.type))
|
||||
var tag = getMajorMimeType(test.type);
|
||||
if (tag != "video" || !document.createElement("video").canPlayType(test.type))
|
||||
continue;
|
||||
|
||||
var f = document.createElement("iframe");
|
||||
|
@ -64,6 +64,13 @@ NS_NewContentDocumentLoaderFactory(nsIDocumentLoaderFactory** aResult);
|
||||
#define CONTENTDLF_WEBM_CATEGORIES
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_DASH
|
||||
#define CONTENTDLF_DASH_CATEGORIES \
|
||||
{ "Gecko-Content-Viewers", APPLICATION_DASH, "@mozilla.org/content/document-loader-factory;1" },
|
||||
#else
|
||||
#define CONTENTDLF_DASH_CATEGORIES
|
||||
#endif
|
||||
|
||||
#define CONTENTDLF_CATEGORIES \
|
||||
{ "Gecko-Content-Viewers", TEXT_HTML, "@mozilla.org/content/document-loader-factory;1" }, \
|
||||
{ "Gecko-Content-Viewers", TEXT_PLAIN, "@mozilla.org/content/document-loader-factory;1" }, \
|
||||
@ -85,7 +92,9 @@ NS_NewContentDocumentLoaderFactory(nsIDocumentLoaderFactory** aResult);
|
||||
{ "Gecko-Content-Viewers", VIEWSOURCE_CONTENT_TYPE, "@mozilla.org/content/document-loader-factory;1" }, \
|
||||
{ "Gecko-Content-Viewers", IMAGE_SVG_XML, "@mozilla.org/content/document-loader-factory;1" }, \
|
||||
{ "Gecko-Content-Viewers", APPLICATION_MATHML_XML, "@mozilla.org/content/document-loader-factory;1" }, \
|
||||
CONTENTDLF_WEBM_CATEGORIES
|
||||
CONTENTDLF_WEBM_CATEGORIES \
|
||||
CONTENTDLF_DASH_CATEGORIES
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user