Bug 1484720 - Part 2: Remove always-false isSlowPlatform() test function. r=jya

isSlowPlatform() is always false because we no longer support Android 2.3 or B2G.

Also remove unused functions isWindows32() and isAndroid(). They were added in bug 1485875, but the callers were later removed in Windows bug 1475564 and Android bug 1368843.

Depends on D33423

Differential Revision: https://phabricator.services.mozilla.com/D33424

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Chris Peterson 2019-06-04 05:35:53 +00:00
Родитель cdff856b72
Коммит f75ea41c95
4 изменённых файлов: 0 добавлений и 56 удалений

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

@ -631,15 +631,6 @@ var gUnseekableTests = [
{ name:"bogus.duh", type:"bogus/duh"}
];
function isWindows32() {
return navigator.userAgent.includes("Windows") &&
!navigator.userAgent.includes("Win64");
}
function isAndroid() {
return navigator.userAgent.includes("Android");
}
var androidVersion = -1; // non-Android platforms
if (manifestNavigator().userAgent.includes("Mobile") ||
manifestNavigator().userAgent.includes("Tablet")) {
@ -1868,11 +1859,6 @@ function mediaTestCleanup(callback) {
SpecialPowers.exactGC(callback);
}
// B2G emulator and Android 2.3 are condidered slow platforms
function isSlowPlatform() {
return SpecialPowers.Services.appinfo.name == "B2G" || getAndroidVersion() == 10;
}
async function dumpDebugInfoForToken(token) {
for (let v of document.getElementsByTagName("video")) {
if (token === v.token) {

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

@ -98,20 +98,6 @@ function startTest(test, token) {
document.body.appendChild(v);
v.play();
// Debug timeouts on slow platforms.
if (isSlowPlatform()) {
var events = ["suspend", "play", "canplay", "canplaythrough", "loadstart", "loadedmetadata",
"loadeddata", "playing", "ended", "error", "stalled", "emptied", "abort",
"waiting", "pause"];
function logEvent(e) {
var v = e.target;
Log(e.target.token, "got " + e.type);
}
events.forEach(function(e) {
v.addEventListener(e, logEvent);
});
}
}
manager.runTests(gPlayTests, startTest);

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

@ -81,20 +81,6 @@ function startTest(test, token) {
document.body.appendChild(v);
v.play();
// Log the event on android devices or emulator for debugging.
if (isSlowPlatform()) {
var events = ["suspend", "play", "canplay", "canplaythrough", "loadstart","loadedmetadata",
"loadeddata", "playing", "ended", "error", "stalled", "emptied", "abort",
"waiting", "pause"];
function logEvent(e) {
var v = e.target;
Log(e.target.token, "got " + e.type);
}
events.forEach(function(e) {
v.addEventListener(e, logEvent);
});
}
}
manager.runTests(gHLSTests, startTest);

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

@ -67,20 +67,6 @@ function startTest(test, token) {
v.addEventListener("ended", checkEnded);
document.body.appendChild(v);
// Debug timeouts on slow platforms.
if (isSlowPlatform()) {
var events = ["suspend", "play", "canplay", "canplaythrough", "loadstart", "loadedmetadata",
"loadeddata", "playing", "ended", "error", "stalled", "emptied", "abort",
"waiting", "pause"];
function logEvent(e) {
var v = e.target;
Log(e.target.token, "got " + e.type);
}
events.forEach(function(e) {
v.addEventListener(e, logEvent);
});
}
}
manager.runTests(gSmallTests, startTest);