зеркало из https://github.com/mozilla/gecko-dev.git
Bug 633622 - Make the webgl mochitest use ANGLE on test machines - r=vlad, a=hardblocker
This commit is contained in:
Родитель
80a997d5d8
Коммит
cf0c23bc81
|
@ -1,7 +1,4 @@
|
|||
conformance/context-attributes.html
|
||||
conformance/gl-enum-tests.html
|
||||
conformance/gl-get-active-attribute.html
|
||||
conformance/gl-uniform-bool.html
|
||||
conformance/gl-vertexattribpointer.html
|
||||
conformance/glsl-2types-of-textures-on-same-unit.html
|
||||
conformance/tex-image-and-sub-image-2d-with-array-buffer-view.html
|
||||
conformance/texture-active-bind-2.html
|
||||
|
|
|
@ -39,41 +39,6 @@ Mochitest version of the WebGL Conformance Test Suite
|
|||
|
||||
function start() {
|
||||
|
||||
function prefSvc() {
|
||||
var svc = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefService).getBranch("");
|
||||
return svc;
|
||||
}
|
||||
|
||||
function setForceEnabled(value) {
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
prefSvc().setBoolPref("webgl.force-enabled", value);
|
||||
}
|
||||
|
||||
function getForceEnabled() {
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
return prefSvc().getBoolPref("webgl.force-enabled");
|
||||
}
|
||||
|
||||
function setPreferGL(value) {
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
prefSvc().setBoolPref("webgl.prefer-native-gl", value);
|
||||
}
|
||||
|
||||
function getPreferGL() {
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var retval = false;
|
||||
try {
|
||||
retval = prefSvc().getBoolPref("webgl.prefer-native-gl");
|
||||
} catch (ex) { }
|
||||
return retval;
|
||||
}
|
||||
|
||||
function restoreOldPrefs() {
|
||||
setForceEnabled(saved_force_enabled);
|
||||
setPreferGL(saved_prefer_gl);
|
||||
}
|
||||
|
||||
function getEnv(env) {
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var envsvc = Components.classes["@mozilla.org/process/environment;1"].getService(Components.interfaces.nsIEnvironment);
|
||||
|
@ -268,7 +233,6 @@ function start() {
|
|||
for (var i = 0; i < testsExpectedToFail.length; ++i)
|
||||
if (testsSuccessful.indexOf(testsExpectedToFail[i]) != -1)
|
||||
ok(false, 'Test expected to fail, but passed: ' + testsExpectedToFail[i]);
|
||||
restoreOldPrefs();
|
||||
statusTextNode.textContent = 'Finished';
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
@ -295,14 +259,6 @@ function start() {
|
|||
function runTestSuite() {
|
||||
var reporter = new Reporter();
|
||||
|
||||
// set WebGL-related preferences needed to run WebGL tests
|
||||
setForceEnabled(true);
|
||||
|
||||
// XXX temporary hack. Until the DirectX runtime is deployed on test slaves, we just use OpenGL,
|
||||
// so that rel-eng can safely deploy DirectX runtime without getting sudden mochitest failures
|
||||
// (e.g. if there's a ANGLE bug).
|
||||
setPreferGL(true);
|
||||
|
||||
// try to create a dummy WebGL context, just to catch context creation failures once here,
|
||||
// rather than having them result in 100's of failures (one in each test page)
|
||||
var canvas = document.getElementById("webglcheck-default");
|
||||
|
@ -372,9 +328,9 @@ function start() {
|
|||
try {
|
||||
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 OS 10.6 corresponds to Darwin version 10 !
|
||||
.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 = (parseFloat(version) >= 10.0);
|
||||
|
@ -386,9 +342,6 @@ function start() {
|
|||
}
|
||||
}
|
||||
|
||||
var saved_force_enabled = getForceEnabled();
|
||||
var saved_prefer_gl = getPreferGL();
|
||||
|
||||
var statusElem = document.getElementById("status");
|
||||
var statusTextNode = document.createTextNode('');
|
||||
statusElem.appendChild(statusTextNode);
|
||||
|
|
Загрузка…
Ссылка в новой задаче