зеркало из https://github.com/mozilla/gecko-dev.git
backout 6a94d3142674 / bug 629595, it was bitrotted and caused mochitest-1 failure
This commit is contained in:
Родитель
b1226e41fc
Коммит
9b60ee63b6
|
@ -42,8 +42,6 @@ var OPTIONS = {
|
||||||
return request.responseText;
|
return request.responseText;
|
||||||
};
|
};
|
||||||
|
|
||||||
SimpleTest.waitForExplicitFinish();
|
|
||||||
|
|
||||||
function start() {
|
function start() {
|
||||||
|
|
||||||
var kIsWindows = false;
|
var kIsWindows = false;
|
||||||
|
@ -64,31 +62,6 @@ function start() {
|
||||||
.getService(Components.interfaces.nsIPropertyBag2)
|
.getService(Components.interfaces.nsIPropertyBag2)
|
||||||
.getProperty("version");
|
.getProperty("version");
|
||||||
kIsWindowsVistaOrHigher = (parseFloat(version) >= 6.0);
|
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) {
|
function getEnv(env) {
|
||||||
|
@ -370,18 +343,37 @@ function start() {
|
||||||
} else {
|
} else {
|
||||||
var errmsg = "Can't create a WebGL context";
|
var errmsg = "Can't create a WebGL context";
|
||||||
reporter.fullResultsNode.textContent = errmsg;
|
reporter.fullResultsNode.textContent = errmsg;
|
||||||
// Workaround for SeaMonkey tinderboxes which don't support WebGL.
|
ok(false, errmsg);
|
||||||
if (navigator.userAgent.match(/ SeaMonkey\//))
|
|
||||||
todo(false, errmsg + " (This is expected on SeaMonkey (tinderboxes).)");
|
|
||||||
else
|
|
||||||
ok(false, errmsg);
|
|
||||||
dump("WebGL mochitest failed: " + errmsg + "\n");
|
dump("WebGL mochitest failed: " + errmsg + "\n");
|
||||||
reporter.finishedTestSuite();
|
reporter.finishedTestSuite();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
SimpleTest.waitForExplicitFinish();
|
||||||
SimpleTest.requestLongerTimeout(3);
|
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 statusElem = document.getElementById("status");
|
||||||
var statusTextNode = document.createTextNode('');
|
var statusTextNode = document.createTextNode('');
|
||||||
statusElem.appendChild(statusTextNode);
|
statusElem.appendChild(statusTextNode);
|
||||||
|
@ -439,7 +431,7 @@ function start() {
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body onload="start();">
|
<body onload="start()">
|
||||||
<p id="display"></p>
|
<p id="display"></p>
|
||||||
<div id="content" style="display: none">
|
<div id="content" style="display: none">
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче