Bug 628589. (Fv2) test_acceleration.html: Add a workaround for SeaMonkey (tinderboxes) which don't support acceleration. r=joe.

This commit is contained in:
Serge Gautherie 2012-01-16 21:52:18 +01:00
Родитель d9c7166d10
Коммит 61c4501464
1 изменённых файлов: 21 добавлений и 3 удалений

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

@ -43,21 +43,39 @@ while (windows.hasMoreElements()) {
var osName = sysInfo.getProperty("name");
switch(osName)
{
case "Darwin":
case "Darwin": // Mac OS X.
// We only enable OpenGL layers on machines that don't support QuickDraw
// plugins. x86-64 architecture is a good proxy for this plugin support.
if (sysInfo.getProperty("arch") != "x86-64") {
is(acceleratedWindows, 0, "Acceleration not supported on x86 OS X");
} else {
// Workaround for SeaMonkey tinderboxes which don't support acceleration.
if (navigator.userAgent.match(/ SeaMonkey\//)) {
if (acceleratedWindows == 0) {
todo(false, "Acceleration not supported on x86-64 OS X" +
" (This is expected on SeaMonkey (tinderboxes).)");
break;
}
}
isnot(acceleratedWindows, 0, "Acceleration enabled on x86-64 OS X");
}
break;
case "Windows_NT":
case "Windows_NT": // Windows.
var version = parseFloat(sysInfo.getProperty("version"));
if (version == 5.0) {
is(acceleratedWindows, 0, "Acceleration not supported on Windows 2000");
} else {
// Workaround for SeaMonkey tinderboxes which don't support acceleration.
if (navigator.userAgent.match(/ SeaMonkey\//)) {
if (acceleratedWindows == 0) {
todo(false, "Acceleration not supported on Windows XP or newer" +
" (This is expected on SeaMonkey (tinderboxes).)");
break;
}
}
isnot(acceleratedWindows, 0, "Acceleration enabled on Windows XP or newer");
}
@ -71,7 +89,7 @@ switch(osName)
}
break;
default:
default: // Linux and others.
is(acceleratedWindows, 0, "Acceleration not supported on '" + osName + "'");
}