mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1232335 - [1.3] Fix test_can_play_type_mpeg for Android. r=snorp
This commit is contained in:
parent
e2d8681359
commit
0477860247
@ -507,7 +507,8 @@ var gUnseekableTests = [
|
||||
];
|
||||
|
||||
var androidVersion = -1; // non-Android platforms
|
||||
if (manifestNavigator().userAgent.indexOf("Mobile") != -1) {
|
||||
if (manifestNavigator().userAgent.indexOf("Mobile") != -1 ||
|
||||
manifestNavigator().userAgent.indexOf("Tablet") != -1) {
|
||||
// See nsSystemInfo.cpp, the getProperty('version') returns different value
|
||||
// on each platforms, so we need to distinguish the android and B2G platform.
|
||||
var versionString = manifestNavigator().userAgent.indexOf("Android") != -1 ?
|
||||
|
@ -124,13 +124,18 @@ function getPref(name) {
|
||||
return pref;
|
||||
}
|
||||
|
||||
function IsSupportedAndroid() {
|
||||
return getAndroidVersion() >= 14;
|
||||
}
|
||||
|
||||
function IsJellyBeanOrLater() {
|
||||
return androidVersion >= 16;
|
||||
return getAndroidVersion() >= 16;
|
||||
}
|
||||
|
||||
var haveMp4 = (getPref("media.wmf.enabled") && IsWindowsVistaOrLater()) ||
|
||||
IsMacOSSnowLeopardOrLater() ||
|
||||
IsJellyBeanOrLater() ||
|
||||
(IsAndroid() &&
|
||||
(IsJellyBeanOrLater() || getPref("media.plugins.enabled"))) ||
|
||||
getPref("media.omx.enabled") ||
|
||||
(IsLinux() && getPref("media.ffmpeg.enabled"));
|
||||
|
||||
@ -138,8 +143,10 @@ check_mp4(document.getElementById('v'), haveMp4);
|
||||
|
||||
var haveMp3 = getPref("media.directshow.enabled") ||
|
||||
(getPref("media.wmf.enabled") && IsWindowsVistaOrLater()) ||
|
||||
(IsJellyBeanOrLater() && getPref("media.android-media-codec.enabled")) ||
|
||||
(IsLinux() && getPref("media.ffmpeg.enabled")) ||
|
||||
(IsSupportedAndroid() &&
|
||||
((IsJellyBeanOrLater() && getPref("media.android-media-codec.enabled")) ||
|
||||
getPref("media.plugins.enabled"))) ||
|
||||
getPref("media.apple.mp3.enabled");
|
||||
check_mp3(document.getElementById('v'), haveMp3);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user