From 0a792e1760e9aea45c2ce3a7a0299f9b6943893d Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Mon, 14 Feb 2011 12:04:54 -0500 Subject: [PATCH] Bug 633622 - Make the webgl mochitest use ANGLE on test machines - r=vlad, a=hardblocker --- .../test/webgl/failing_tests_windows.txt | 5 +- .../test_webgl_conformance_test_suite.html | 53 ++----------------- 2 files changed, 4 insertions(+), 54 deletions(-) diff --git a/content/canvas/test/webgl/failing_tests_windows.txt b/content/canvas/test/webgl/failing_tests_windows.txt index cdeca2bb665..a59094a39ba 100644 --- a/content/canvas/test/webgl/failing_tests_windows.txt +++ b/content/canvas/test/webgl/failing_tests_windows.txt @@ -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 diff --git a/content/canvas/test/webgl/test_webgl_conformance_test_suite.html b/content/canvas/test/webgl/test_webgl_conformance_test_suite.html index be6149abe66..bfa694a207b 100644 --- a/content/canvas/test/webgl/test_webgl_conformance_test_suite.html +++ b/content/canvas/test/webgl/test_webgl_conformance_test_suite.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);