Bug 636613 - Let WebGL mochitest run on Windows XP - r=jrmuizel, a=joe
authorBenoit Jacob <bjacob@mozilla.com>
Tue, 01 Mar 2011 17:25:22 -0500
changeset 63218 09afa1295d85ff1cb315f1f721873a46aa5ef9e0
parent 63217 24cff06ec75f5ae20a0299b014f7b9ed955313a8
child 63219 23ef0e8b9e121b05d16dd0c7c5e1e8d10a719da1
push id19084
push userbjacob@mozilla.com
push dateTue, 01 Mar 2011 22:25:40 +0000
treeherdermozilla-central@c0b114d35e7b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel, joe
bugs636613
milestone2.0b13pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 636613 - Let WebGL mochitest run on Windows XP - r=jrmuizel, a=joe
content/canvas/test/webgl/test_webgl_conformance_test_suite.html
--- a/content/canvas/test/webgl/test_webgl_conformance_test_suite.html
+++ b/content/canvas/test/webgl/test_webgl_conformance_test_suite.html
@@ -295,53 +295,44 @@ function start() {
   var kIsLinux = false;
   if (navigator.platform.indexOf("Win") == 0)
     kIsWindows = true;
   else if (navigator.platform.indexOf("Linux") == 0)
     kIsLinux = true;
   else if (navigator.platform.indexOf("Mac") == 0)
     kIsMac = true;
 
+  var kIsWindowsVistaOrHigher = false;
   // we currently disable this test on versions of Windows older than Windows Vista,
   // due to failure to load ANGLE on win 2003 test slaves, see bug 582053.
   if (kIsWindows) {
     // code borrowed from browser/components/wintaskbar/test/browser_taskbar_preview.js
-    var isWinVistaOrHigher = false;
-    try {
-      netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-      var version = Components.classes["@mozilla.org/system-info;1"]
-                              .getService(Components.interfaces.nsIPropertyBag2)
-                              .getProperty("version");
-      isWinVistaOrHigher = (parseFloat(version) >= 6.0);
-    } catch (ex) {}
-    if (!isWinVistaOrHigher) {
-      dump("WebGL mochitest disabled on Windows versions older than Vista");
-      SimpleTest.finish();
-      return;
-    }
+    netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+    var version = Components.classes["@mozilla.org/system-info;1"]
+                            .getService(Components.interfaces.nsIPropertyBag2)
+                            .getProperty("version");
+    kIsWindowsVistaOrHigher = (parseFloat(version) >= 6.0);
   }
 
   // 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
     var is106orHigher = false;
-    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 !
-      // 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);
-    } catch (ex) { }
+    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 !
+    // 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);
     if (!is106orHigher) {
-      dump("WebGL mochitest disabled on Mac OSX versions older than 10.6");
+      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);
@@ -361,16 +352,20 @@ function start() {
     failingTestsFilename = 'failing_tests_linux.txt';
   else if (kIsMac)
     failingTestsFilename = 'failing_tests_mac.txt';
 
   var testsExpectedToFail = loadTextFileSynchronous(failingTestsFilename)
                             .replace(/\r/g, '') // convert to unix line breaks
                             .split('\n');
 
+  // canvas-test.html is currently failing on Windows XP test slaves
+  if (kIsWindows && !kIsWindowsVistaOrHigher)
+      testsExpectedToFail.push('conformance/canvas-test.html');
+
   var testsSuccessful = [];
 
   runTestSuite();
 }
 
 </script>
 </head>
 <body onload="start()">