Bug 978127 - Update various win8 specific australis customized ui tests to use new Services.metro.supported prop. r=gijs
authorJim Mathies <jmathies@mozilla.com>
Fri, 28 Feb 2014 17:40:34 -0600
changeset 171303 a66831238267c4cc8288f167fbd142c4a32ee8b7
parent 171302 0bffec16177c6e3b00db97e2cc4ac62cdb6a0d34
child 171304 87cb292f34703cc1a9349ee3f76350b3381ca994
push id5375
push userjmathies@mozilla.com
push dateFri, 28 Feb 2014 23:40:43 +0000
treeherderfx-team@a66831238267 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgijs
bugs978127
milestone30.0a1
Bug 978127 - Update various win8 specific australis customized ui tests to use new Services.metro.supported prop. r=gijs
browser/components/customizableui/test/head.js
--- a/browser/components/customizableui/test/head.js
+++ b/browser/components/customizableui/test/head.js
@@ -55,22 +55,19 @@ function removeCustomToolbars() {
   gAddedToolbars.clear();
 }
 
 function resetCustomization() {
   return CustomizableUI.reset();
 }
 
 function isInWin8() {
-  let sysInfo = Services.sysinfo;
-  let osName = sysInfo.getProperty("name");
-  let version = sysInfo.getProperty("version");
-
-  // Windows 8 is version >= 6.2
-  return osName == "Windows_NT" && version >= 6.2;
+  if (!Services.metro)
+    return false;
+  return Services.metro.supported;
 }
 
 function addSwitchToMetroButtonInWindows8(areaPanelPlacements) {
   if (isInWin8()) {
     areaPanelPlacements.push("switch-to-metro-button");
   }
 }