Backed out changeset 93203c822307 (bug 900241) for mochitest failures
authorWes Kocher <wkocher@mozilla.com>
Wed, 09 Jul 2014 15:17:09 -0700
changeset 193155 08adad9d0ddf9e80df241cc1c5d5a997d6013d12
parent 193154 380eeb45c0fb467c87bb14833a13a23a31fe37cb
child 193156 27c05d51601084baae04ac4fb8ef57ca675f04b3
push id27111
push usercbook@mozilla.com
push dateThu, 10 Jul 2014 12:41:20 +0000
treeherdermozilla-central@41e1a83bd7f7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs900241
milestone33.0a1
backs out93203c82230733fee6ca3071bb6f601d519baa3d
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
Backed out changeset 93203c822307 (bug 900241) for mochitest failures
dom/base/Navigator.cpp
dom/base/test/test_getFeature_with_perm.html
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -1510,35 +1510,16 @@ Navigator::GetFeature(const nsAString& a
       mozilla::dom::ContentChild* cc =
         mozilla::dom::ContentChild::GetSingleton();
       nsRefPtr<Promise> ipcRef(p);
       cc->SendGetSystemMemory(reinterpret_cast<uint64_t>(ipcRef.forget().take()));
     }
     return p.forget();
   } // hardware.memory
 #endif
-
-  // Hardcoded manifest features. Some are still b2g specific.
-  const char manifestFeatures[][64] = {
-    "manifest.origin"
-  , "manifest.redirects"
-#ifdef MOZ_B2G
-  , "manifest.chrome.navigation"
-  , "manifest.precompile"
-#endif
-  };
-
-  nsAutoCString feature = NS_ConvertUTF16toUTF8(aName);
-  for (uint32_t i = 0; i < MOZ_ARRAY_LENGTH(manifestFeatures); i++) {
-    if (feature.Equals(manifestFeatures[i])) {
-      p->MaybeResolve(true);
-      return p.forget();
-    }
-  }
-
   // resolve with <undefined> because the feature name is not supported
   p->MaybeResolve(JS::UndefinedHandleValue);
 
   return p.forget();
 }
 
 
 PowerManager*
--- a/dom/base/test/test_getFeature_with_perm.html
+++ b/dom/base/test/test_getFeature_with_perm.html
@@ -33,78 +33,38 @@ function testSupported() {
 
     if (isLinux || isAndroid || isB2G) {
       ok(typeof mem === 'number' && (mem) % 1 === 0, "We should receive an integer on this platform");
       ok(mem > 0, "hardware.memory is supported on this platform. mem=" + mem + "MiB");
     } else {
       ok(typeof mem === 'undefined', "hardware.memory is not support on this platform");
     }
 
-    runNextTest();
+    SimpleTest.finish();
 
   },function(mem) {
     ok(false, "The Promise should not be rejected");
   });
 }
 
 function testNotSupported() {
   var tv;
   navigator.getFeature("hardware.tv").then(function(tv) {
     ok(typeof tv === 'undefined', "Resolve the Promise with undefined value (hardware.tv)");
-    runNextTest();
+    testSupported();
   },function(tv) {
     ok(false, "The Promise should not be rejected")
   });
 }
 
-function createManifestTest(aFeature) {
-  return function() {
-    var res;
-    navigator.getFeature(aFeature).then(function(res) {
-      info("Got " + res + " for " + aFeature);
-      ok(res === true, "Resolve the Promise with 'true' for " + aFeature);
-      runNextTest();
-    },function(tv) {
-      ok(false, "The Promise should not be rejected")
-    });
-  }
-}
-
-var currentTest = -1;
-var tests = [
-  testNotSupported,
-  testSupported,
-  createManifestTest("manifest.origin"),
-  createManifestTest("manifest.redirects")
-];
-
-function runNextTest() {
-  currentTest++;
-  if (currentTest <= tests.length) {
-    tests[currentTest]();
-  } else {
-    SimpleTest.finish();
-  }
-}
-
-info("About to run " + tests.length + " tests");
-
 SpecialPowers.pushPermissions([
   {type: "feature-detection", allow: 1, context: document}
 ], function() {
   ok('getFeature' in navigator, "navigator.getFeature should exist");
-  // B2G specific manifest features.
-  // Touching navigator before pushPermissions makes it fail.
-  if (!navigator.userAgent.contains("Android") &&
-        /Mobile|Tablet/.test(navigator.userAgent)) {
-    info("Adding B2G specific tests");
-    tests.push(createManifestTest("manifest.chrome.navigation"));
-    tests.push(createManifestTest("manifest.precompile"));
-  }
-  runNextTest();
+  testNotSupported();
   ok(true, "Test DONE");
 });
 
 SimpleTest.waitForExplicitFinish();
 
 </script>
 </body>
 </html>