backout 6a94d3142674 / bug 629595, it was bitrotted and caused mochitest-1 failure

This commit is contained in:
Benoit Jacob 2012-02-27 18:31:02 -05:00
Родитель b1226e41fc
Коммит 9b60ee63b6
1 изменённых файлов: 25 добавлений и 33 удалений

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

@ -42,8 +42,6 @@ var OPTIONS = {
return request.responseText;
};
SimpleTest.waitForExplicitFinish();
function start() {
var kIsWindows = false;
@ -64,31 +62,6 @@ function start() {
.getService(Components.interfaces.nsIPropertyBag2)
.getProperty("version");
kIsWindowsVistaOrHigher = (parseFloat(version) >= 6.0);
// Workaround for Windows 2000 (driver?) which may crash itself.
if (parseFloat(version) <= 5.0) {
todo(false, "Test disabled on Windows 2000 and older. (To prevent possible system crash.)");
SimpleTest.finish();
return;
}
}
// we currently disable this test on version of Mac OSX older than 10.6,
// due to various weird failures, including one making getRenderbufferParameter tests
// on DEPTH_STENCIL fail
if (kIsMac) {
// code borrowed from browser/components/wintaskbar/test/browser_taskbar_preview.js
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var version = Components.classes["@mozilla.org/system-info;1"]
.getService(Components.interfaces.nsIPropertyBag2)
.getProperty("version");
// the next line is correct: Mac OSX 10.6 corresponds to Darwin version 10 !
// Mac OSX 10.5 would be Darwin version 9. the |version| string we've got here
// is the Darwin version.
if (parseFloat(version) < 10.0) {
todo(false, "Test disabled on Mac OSX versions older than 10.6.");
SimpleTest.finish();
return;
}
}
function getEnv(env) {
@ -370,18 +343,37 @@ function start() {
} else {
var errmsg = "Can't create a WebGL context";
reporter.fullResultsNode.textContent = errmsg;
// Workaround for SeaMonkey tinderboxes which don't support WebGL.
if (navigator.userAgent.match(/ SeaMonkey\//))
todo(false, errmsg + " (This is expected on SeaMonkey (tinderboxes).)");
else
ok(false, errmsg);
ok(false, errmsg);
dump("WebGL mochitest failed: " + errmsg + "\n");
reporter.finishedTestSuite();
}
};
SimpleTest.waitForExplicitFinish();
SimpleTest.requestLongerTimeout(3);
// we currently disable this test on version of Mac OSX older than 10.6,
// due to various weird failures, including one making getRenderbufferParameter tests
// on DEPTH_STENCIL fail
var kDarwinVersion = 0;
if (kIsMac) {
// code borrowed from browser/modules/test/browser_taskbar_preview.js
var is106orHigher = false;
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
kDarwinVersion = parseFloat(Components.classes["@mozilla.org/system-info;1"]
.getService(Components.interfaces.nsIPropertyBag2)
.getProperty("version"));
// the next line is correct: Mac OS 10.6 corresponds to Darwin version 10 !
// Mac OS 10.5 would be Darwin version 9. the |version| string we've got here
// is the Darwin version.
is106orHigher = (kDarwinVersion >= 10.0);
if (!is106orHigher) {
dump("WebGL mochitest disabled on Mac OSX versions older than 10.6\n");
SimpleTest.finish();
return;
}
}
var statusElem = document.getElementById("status");
var statusTextNode = document.createTextNode('');
statusElem.appendChild(statusTextNode);
@ -439,7 +431,7 @@ function start() {
</script>
</head>
<body onload="start();">
<body onload="start()">
<p id="display"></p>
<div id="content" style="display: none">