зеркало из https://github.com/mozilla/gecko-dev.git
Bug 629595. (Bv1a) test_webgl_conformance_test_suite.html: Ensure waitForExplicitFinish() is executed, Disable test on Windows 2000 and (if necessary) on SeaMonkey, Move Mac OSX version check to a better place. r=bjacob.
This commit is contained in:
Родитель
f6e942ab3e
Коммит
7147cb6c30
|
@ -42,6 +42,8 @@ var OPTIONS = {
|
|||
return request.responseText;
|
||||
};
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function start() {
|
||||
|
||||
var kIsWindows = false;
|
||||
|
@ -62,6 +64,34 @@ 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
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
function getEnv(env) {
|
||||
|
@ -343,37 +373,18 @@ 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);
|
||||
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);
|
||||
|
@ -431,7 +442,7 @@ function start() {
|
|||
|
||||
</script>
|
||||
</head>
|
||||
<body onload="start()">
|
||||
<body onload="start();">
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче