Bug 628589 - [SeaMonkey] mochitest-plain-3: permanent "TEST-UNEXPECTED-FAIL | /tests/gfx/test_acceleration.html | Acceleration enabled on x86-64 OS X". (Windows 2003 too); (Bv1) Add missing 'var', Sort os names alphabetically.
authorSerge Gautherie <sgautherie.bz@free.fr>
Sun, 30 Jan 2011 06:06:09 +0100
changeset 61617 b7ca6147425eb75cfff026e1abe8f5446d3688e0
parent 61616 28bef0ccd9278beb0e136c0f9bc6f66f38a72209
child 61618 3bb4b3a3189af29ddccb7a53599568de7fd42457
push id1
push userroot
push dateTue, 10 Dec 2013 15:46:25 +0000
bugs628589
milestone2.0b11pre
Bug 628589 - [SeaMonkey] mochitest-plain-3: permanent "TEST-UNEXPECTED-FAIL | /tests/gfx/test_acceleration.html | Acceleration enabled on x86-64 OS X". (Windows 2003 too); (Bv1) Add missing 'var', Sort os names alphabetically. r=joe a=(test-only).
gfx/tests/mochitest/test_acceleration.html
--- a/gfx/tests/mochitest/test_acceleration.html
+++ b/gfx/tests/mochitest/test_acceleration.html
@@ -26,46 +26,46 @@ netscape.security.PrivilegeManager.enabl
 Components.utils.import("resource://gre/modules/Services.jsm");
 
 var Cc = Components.classes;
 var Ci = Components.interfaces;
 
 var sysInfo = Cc["@mozilla.org/system-info;1"].getService(Ci.nsIPropertyBag2);
 
 var windows = Services.ww.getWindowEnumerator();
+var windowutils;
 var acceleratedWindows = 0;
 while (windows.hasMoreElements()) {
-  awindow = windows.getNext().QueryInterface(Ci.nsIInterfaceRequestor);
-  windowutils = awindow.getInterface(Ci.nsIDOMWindowUtils);
+  windowutils = windows.getNext().QueryInterface(Ci.nsIInterfaceRequestor)
+                                 .getInterface(Ci.nsIDOMWindowUtils);
   if (windowutils.layerManagerType != "Basic") {
     acceleratedWindows++;
   }
 }
 
 switch(sysInfo.getProperty("name"))
 {
+  case "Darwin":
+    // We only enable OpenGL layers on machines that don't support QuickDraw
+    // plugins. x86-64 architecture is a good proxy for this plugin support.
+    if (sysInfo.getProperty("arch") == "x86-64") {
+      ok(acceleratedWindows != 0, "Acceleration enabled on x86-64 OS X");
+    } else {
+      ok(acceleratedWindows == 0, "Acceleration not enabled on x86 OS X");
+    }
+    break;
+
   case "Windows_NT":
     ok(acceleratedWindows != 0, "Acceleration enabled on Windows");
 
     // Also check that D2D is enabled.
     var version = parseFloat(sysInfo.getProperty("version"));
     if (version >= 6.0) {
       var gfxInfo = Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfo);
       ok(gfxInfo.D2DEnabled, "D2D enabled on Windows Vista or higher");
     }
-
-    break;
-
-  case "Darwin":
-    // We only enable OpenGL layers on machines that don't support QuickDraw
-    // plugins. x86-64 architecture is a good proxy for this plugin support.
-    if (sysInfo.getProperty("arch") == "x86-64") {
-      ok(acceleratedWindows != 0, "Acceleration enabled on x86-64 OS X");
-    } else {
-      ok(acceleratedWindows == 0, "Acceleration not enabled on x86 OS X");
-    }
     break;
 }
 
 </script>
 </pre>
 </body>
 </html>