Bug 943430 - Rename geo.testing.ignore_ipc_principal to dom.testing.ignore_ipc_principal. r=ehsan
authorAndrea Marchesini <amarchesini@mozilla.com>
Mon, 02 Dec 2013 10:27:57 -0500
changeset 172934 bc50783a4cf7dd099e7c447adc17f67280fd78c3
parent 172933 10de0a51d2ba44208410bf0829796c794f0369c3
child 172935 691b5f265c9a1cc3f398686173fca43295ee1386
push id3224
push userlsblakk@mozilla.com
push dateTue, 04 Feb 2014 01:06:49 +0000
treeherdermozilla-beta@60c04d0987f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs943430
milestone28.0a1
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 943430 - Rename geo.testing.ignore_ipc_principal to dom.testing.ignore_ipc_principal. r=ehsan
dom/datastore/tests/test_app_install.html
dom/datastore/tests/test_arrays.html
dom/datastore/tests/test_basic.html
dom/datastore/tests/test_bug924104.html
dom/datastore/tests/test_changes.html
dom/datastore/tests/test_oop.html
dom/datastore/tests/test_readonly.html
dom/datastore/tests/test_sync.html
dom/ipc/ContentParent.cpp
dom/ipc/TabParent.cpp
dom/tests/unit/test_geolocation_provider.js
dom/tests/unit/test_geolocation_reset_accuracy.js
dom/tests/unit/test_geolocation_reset_accuracy_wrap.js
dom/tests/unit/test_geolocation_timeout.js
dom/tests/unit/test_geolocation_timeout_wrap.js
--- a/dom/datastore/tests/test_app_install.html
+++ b/dom/datastore/tests/test_app_install.html
@@ -22,17 +22,17 @@
 
   SpecialPowers.pushPermissions(
     [{ "type": "browser", "allow": 1, "context": document },
      { "type": "embed-apps", "allow": 1, "context": document },
      { "type": "webapps-manage", "allow": 1, "context": document }],
     function() {
       SpecialPowers.pushPrefEnv({"set": [["dom.datastore.enabled", true],
                                          ["dom.promise.enabled", true],
-                                         ["geo.testing.ignore_ipc_principal", true]]}, function() {
+                                         ["dom.testing.ignore_ipc_principal", true]]}, function() {
         gGenerator.next(); });
     });
 
   function continueTest() {
     try { gGenerator.next(); }
     catch(e) { dump("Got exception: " + e + "\n"); }
   }
 
--- a/dom/datastore/tests/test_arrays.html
+++ b/dom/datastore/tests/test_arrays.html
@@ -71,25 +71,19 @@
       SpecialPowers.pushPermissions(
         [{ "type": "browser", "allow": 1, "context": document },
          { "type": "embed-apps", "allow": 1, "context": document },
          { "type": "webapps-manage", "allow": 1, "context": document }], runTest);
     },
 
     // Preferences
     function() {
-      SpecialPowers.pushPrefEnv({"set": [["dom.promise.enabled", true]]}, runTest);
-    },
-
-    function() {
-      SpecialPowers.pushPrefEnv({"set": [["dom.datastore.enabled", true]]}, runTest);
-    },
-
-    function() {
-      SpecialPowers.pushPrefEnv({"set": [["geo.testing.ignore_ipc_principal", true]]}, runTest);
+      SpecialPowers.pushPrefEnv({"set": [["dom.promise.enabled", true],
+                                         ["dom.datastore.enabled", true],
+                                         ["dom.testing.ignore_ipc_principal", true]]}, runTest);
     },
 
     function() {
       SpecialPowers.setAllAppsLaunchable(true);
       SpecialPowers.setBoolPref("dom.mozBrowserFramesEnabled", true);
       runTest();
     },
 
--- a/dom/datastore/tests/test_basic.html
+++ b/dom/datastore/tests/test_basic.html
@@ -71,25 +71,19 @@
       SpecialPowers.pushPermissions(
         [{ "type": "browser", "allow": 1, "context": document },
          { "type": "embed-apps", "allow": 1, "context": document },
          { "type": "webapps-manage", "allow": 1, "context": document }], runTest);
     },
 
     // Preferences
     function() {
-      SpecialPowers.pushPrefEnv({"set": [["dom.promise.enabled", true]]}, runTest);
-    },
-
-    function() {
-      SpecialPowers.pushPrefEnv({"set": [["dom.datastore.enabled", true]]}, runTest);
-    },
-
-    function() {
-      SpecialPowers.pushPrefEnv({"set": [["geo.testing.ignore_ipc_principal", true]]}, runTest);
+      SpecialPowers.pushPrefEnv({"set": [["dom.promise.enabled", true],
+                                         ["dom.datastore.enabled", true],
+                                         ["dom.testing.ignore_ipc_principal", true]]}, runTest);
     },
 
     function() {
       SpecialPowers.setAllAppsLaunchable(true);
       SpecialPowers.setBoolPref("dom.mozBrowserFramesEnabled", true);
       runTest();
     },
 
--- a/dom/datastore/tests/test_bug924104.html
+++ b/dom/datastore/tests/test_bug924104.html
@@ -71,25 +71,19 @@
       SpecialPowers.pushPermissions(
         [{ "type": "browser", "allow": 1, "context": document },
          { "type": "embed-apps", "allow": 1, "context": document },
          { "type": "webapps-manage", "allow": 1, "context": document }], runTest);
     },
 
     // Preferences
     function() {
-      SpecialPowers.pushPrefEnv({"set": [["dom.promise.enabled", true]]}, runTest);
-    },
-
-    function() {
-      SpecialPowers.pushPrefEnv({"set": [["dom.datastore.enabled", true]]}, runTest);
-    },
-
-    function() {
-      SpecialPowers.pushPrefEnv({"set": [["geo.testing.ignore_ipc_principal", true]]}, runTest);
+      SpecialPowers.pushPrefEnv({"set": [["dom.promise.enabled", true],
+                                         ["dom.datastore.enabled", true],
+                                         ["dom.testing.ignore_ipc_principal", true]]}, runTest);
     },
 
     function() {
       SpecialPowers.setAllAppsLaunchable(true);
       SpecialPowers.setBoolPref("dom.mozBrowserFramesEnabled", true);
       runTest();
     },
 
--- a/dom/datastore/tests/test_changes.html
+++ b/dom/datastore/tests/test_changes.html
@@ -115,25 +115,19 @@
       SpecialPowers.pushPermissions(
         [{ "type": "browser", "allow": 1, "context": document },
          { "type": "embed-apps", "allow": 1, "context": document },
          { "type": "webapps-manage", "allow": 1, "context": document }], runTest);
     },
 
     // Preferences
     function() {
-      SpecialPowers.pushPrefEnv({"set": [["dom.promise.enabled", true]]}, runTest);
-    },
-
-    function() {
-      SpecialPowers.pushPrefEnv({"set": [["dom.datastore.enabled", true]]}, runTest);
-    },
-
-    function() {
-      SpecialPowers.pushPrefEnv({"set": [["geo.testing.ignore_ipc_principal", true]]}, runTest);
+      SpecialPowers.pushPrefEnv({"set": [["dom.promise.enabled", true],
+                                         ["dom.datastore.enabled", true],
+                                         ["dom.testing.ignore_ipc_principal", true]]}, runTest);
     },
 
     // Enabling mozBrowser
     function() {
       SpecialPowers.setAllAppsLaunchable(true);
       SpecialPowers.pushPrefEnv({"set": [["dom.mozBrowserFramesEnabled", true]]}, runTest);
     },
 
--- a/dom/datastore/tests/test_oop.html
+++ b/dom/datastore/tests/test_oop.html
@@ -71,25 +71,19 @@
       SpecialPowers.pushPermissions(
         [{ "type": "browser", "allow": 1, "context": document },
          { "type": "embed-apps", "allow": 1, "context": document },
          { "type": "webapps-manage", "allow": 1, "context": document }], runTest);
     },
 
     // Preferences
     function() {
-      SpecialPowers.pushPrefEnv({"set": [["dom.promise.enabled", true]]}, runTest);
-    },
-
-    function() {
-      SpecialPowers.pushPrefEnv({"set": [["dom.datastore.enabled", true]]}, runTest);
-    },
-
-    function() {
-      SpecialPowers.pushPrefEnv({"set": [["geo.testing.ignore_ipc_principal", true]]}, runTest);
+      SpecialPowers.pushPrefEnv({"set": [["dom.promise.enabled", true],
+                                         ["dom.datastore.enabled", true],
+                                         ["dom.testing.ignore_ipc_principal", true]]}, runTest);
     },
 
     function() {
       SpecialPowers.pushPrefEnv({"set": [["dom.ipc.browser_frames.oop_by_default", true]]}, runTest);
     },
 
     function() {
       SpecialPowers.setAllAppsLaunchable(true);
--- a/dom/datastore/tests/test_readonly.html
+++ b/dom/datastore/tests/test_readonly.html
@@ -97,12 +97,12 @@
 
   if (SpecialPowers.isMainProcess()) {
     SpecialPowers.Cu.import("resource://gre/modules/DataStoreChangeNotifier.jsm");
   }
 
   SimpleTest.waitForExplicitFinish();
   SpecialPowers.pushPrefEnv({"set": [["dom.promise.enabled", true],
                                      ["dom.datastore.enabled", true],
-                                     ["geo.testing.ignore_ipc_principal", true]]}, runTest);
+                                     ["dom.testing.ignore_ipc_principal", true]]}, runTest);
   </script>
 </body>
 </html>
--- a/dom/datastore/tests/test_sync.html
+++ b/dom/datastore/tests/test_sync.html
@@ -71,25 +71,19 @@
       SpecialPowers.pushPermissions(
         [{ "type": "browser", "allow": 1, "context": document },
          { "type": "embed-apps", "allow": 1, "context": document },
          { "type": "webapps-manage", "allow": 1, "context": document }], runTest);
     },
 
     // Preferences
     function() {
-      SpecialPowers.pushPrefEnv({"set": [["dom.promise.enabled", true]]}, runTest);
-    },
-
-    function() {
-      SpecialPowers.pushPrefEnv({"set": [["dom.datastore.enabled", true]]}, runTest);
-    },
-
-    function() {
-      SpecialPowers.pushPrefEnv({"set": [["geo.testing.ignore_ipc_principal", true]]}, runTest);
+      SpecialPowers.pushPrefEnv({"set": [["dom.promise.enabled", true],
+                                         ["dom.datastore.enabled", true],
+                                         ["dom.testing.ignore_ipc_principal", true]]}, runTest);
     },
 
     function() {
       SpecialPowers.setBoolPref("dom.mozBrowserFramesEnabled", true);
       runTest();
     },
 
     // No confirmation needed when an app is installed
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -2754,17 +2754,17 @@ ContentParent::RecvCloseAlert(const nsSt
 bool
 ContentParent::RecvSyncMessage(const nsString& aMsg,
                                const ClonedMessageData& aData,
                                const InfallibleTArray<CpowEntry>& aCpows,
                                const IPC::Principal& aPrincipal,
                                InfallibleTArray<nsString>* aRetvals)
 {
   nsIPrincipal* principal = aPrincipal;
-  if (!Preferences::GetBool("geo.testing.ignore_ipc_principal", false) &&
+  if (!Preferences::GetBool("dom.testing.ignore_ipc_principal", false) &&
       principal && !AssertAppPrincipal(this, principal)) {
     return false;
   }
 
   nsRefPtr<nsFrameMessageManager> ppm = mMessageManager;
   if (ppm) {
     StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForParent(aData);
     CpowIdHolder cpows(GetCPOWManager(), aCpows);
@@ -2778,17 +2778,17 @@ ContentParent::RecvSyncMessage(const nsS
 bool
 ContentParent::AnswerRpcMessage(const nsString& aMsg,
                                 const ClonedMessageData& aData,
                                 const InfallibleTArray<CpowEntry>& aCpows,
                                 const IPC::Principal& aPrincipal,
                                 InfallibleTArray<nsString>* aRetvals)
 {
   nsIPrincipal* principal = aPrincipal;
-  if (!Preferences::GetBool("geo.testing.ignore_ipc_principal", false) &&
+  if (!Preferences::GetBool("dom.testing.ignore_ipc_principal", false) &&
       principal && !AssertAppPrincipal(this, principal)) {
     return false;
   }
 
   nsRefPtr<nsFrameMessageManager> ppm = mMessageManager;
   if (ppm) {
     StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForParent(aData);
     CpowIdHolder cpows(GetCPOWManager(), aCpows);
@@ -2800,17 +2800,17 @@ ContentParent::AnswerRpcMessage(const ns
 
 bool
 ContentParent::RecvAsyncMessage(const nsString& aMsg,
                                 const ClonedMessageData& aData,
                                 const InfallibleTArray<CpowEntry>& aCpows,
                                 const IPC::Principal& aPrincipal)
 {
   nsIPrincipal* principal = aPrincipal;
-  if (!Preferences::GetBool("geo.testing.ignore_ipc_principal", false) &&
+  if (!Preferences::GetBool("dom.testing.ignore_ipc_principal", false) &&
       principal && !AssertAppPrincipal(this, principal)) {
     return false;
   }
 
   nsRefPtr<nsFrameMessageManager> ppm = mMessageManager;
   if (ppm) {
     StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForParent(aData);
     CpowIdHolder cpows(GetCPOWManager(), aCpows);
@@ -2856,17 +2856,17 @@ AddGeolocationListener(nsIDOMGeoPosition
   return retval;
 }
 
 bool
 ContentParent::RecvAddGeolocationListener(const IPC::Principal& aPrincipal,
                                           const bool& aHighAccuracy)
 {
 #ifdef MOZ_CHILD_PERMISSIONS
-  if (!Preferences::GetBool("geo.testing.ignore_ipc_principal", false)) {
+  if (!Preferences::GetBool("dom.testing.ignore_ipc_principal", false)) {
     uint32_t permission = mozilla::CheckPermission(this, aPrincipal,
                                                    "geolocation");
     if (permission != nsIPermissionManager::ALLOW_ACTION) {
       return true;
     }
   }
 #endif /* MOZ_CHILD_PERMISSIONS */
 
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -772,17 +772,17 @@ bool
 TabParent::RecvSyncMessage(const nsString& aMessage,
                            const ClonedMessageData& aData,
                            const InfallibleTArray<CpowEntry>& aCpows,
                            const IPC::Principal& aPrincipal,
                            InfallibleTArray<nsString>* aJSONRetVal)
 {
   nsIPrincipal* principal = aPrincipal;
   ContentParent* parent = static_cast<ContentParent*>(Manager());
-  if (!Preferences::GetBool("geo.testing.ignore_ipc_principal", false) &&
+  if (!Preferences::GetBool("dom.testing.ignore_ipc_principal", false) &&
       principal && !AssertAppPrincipal(parent, principal)) {
     return false;
   }
 
   StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForParent(aData);
   CpowIdHolder cpows(parent->GetCPOWManager(), aCpows);
   return ReceiveMessage(aMessage, true, &cloneData, &cpows, aPrincipal, aJSONRetVal);
 }
@@ -791,17 +791,17 @@ bool
 TabParent::AnswerRpcMessage(const nsString& aMessage,
                             const ClonedMessageData& aData,
                             const InfallibleTArray<CpowEntry>& aCpows,
                             const IPC::Principal& aPrincipal,
                             InfallibleTArray<nsString>* aJSONRetVal)
 {
   nsIPrincipal* principal = aPrincipal;
   ContentParent* parent = static_cast<ContentParent*>(Manager());
-  if (!Preferences::GetBool("geo.testing.ignore_ipc_principal", false) &&
+  if (!Preferences::GetBool("dom.testing.ignore_ipc_principal", false) &&
       principal && !AssertAppPrincipal(parent, principal)) {
     return false;
   }
 
   StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForParent(aData);
   CpowIdHolder cpows(parent->GetCPOWManager(), aCpows);
   return ReceiveMessage(aMessage, true, &cloneData, &cpows, aPrincipal, aJSONRetVal);
 }
@@ -809,17 +809,17 @@ TabParent::AnswerRpcMessage(const nsStri
 bool
 TabParent::RecvAsyncMessage(const nsString& aMessage,
                             const ClonedMessageData& aData,
                             const InfallibleTArray<CpowEntry>& aCpows,
                             const IPC::Principal& aPrincipal)
 {
   nsIPrincipal* principal = aPrincipal;
   ContentParent* parent = static_cast<ContentParent*>(Manager());
-  if (!Preferences::GetBool("geo.testing.ignore_ipc_principal", false) &&
+  if (!Preferences::GetBool("dom.testing.ignore_ipc_principal", false) &&
       principal && !AssertAppPrincipal(parent, principal)) {
     return false;
   }
 
   StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForParent(aData);
   CpowIdHolder cpows(parent->GetCPOWManager(), aCpows);
   return ReceiveMessage(aMessage, false, &cloneData, &cpows, aPrincipal, nullptr);
 }
--- a/dom/tests/unit/test_geolocation_provider.js
+++ b/dom/tests/unit/test_geolocation_provider.js
@@ -75,17 +75,17 @@ function run_test()
 
     httpserver = new HttpServer();
     httpserver.registerPathHandler("/geo", geoHandler);
     httpserver.start(-1);
 
     var prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
     prefs.setCharPref("geo.wifi.uri", "http://localhost:" +
                       httpserver.identity.primaryPort + "/geo");
-    prefs.setBoolPref("geo.testing.ignore_ipc_principal", true);
+    prefs.setBoolPref("dom.testing.ignore_ipc_principal", true);
     prefs.setBoolPref("geo.wifi.scan", false);
 
     var obs = Cc["@mozilla.org/observer-service;1"].getService();
     obs = obs.QueryInterface(Ci.nsIObserverService);
     obs.addObserver(observer, "geolocation-device-events", false);
 
     geolocation = Cc["@mozilla.org/geolocation;1"].getService(Ci.nsISupports);
     watchID = geolocation.watchPosition(successCallback, errorCallback);
--- a/dom/tests/unit/test_geolocation_reset_accuracy.js
+++ b/dom/tests/unit/test_geolocation_reset_accuracy.js
@@ -73,17 +73,17 @@ function run_test()
     Components.manager.nsIComponentRegistrar.registerFactory(providerCID,
       "Unit test geo provider", providerContract, provider);
     var catMan = Components.classes["@mozilla.org/categorymanager;1"]
                            .getService(Components.interfaces.nsICategoryManager);
     catMan.nsICategoryManager.addCategoryEntry(categoryName, "unit test",
                                                providerContract, false, true);
 
     var prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
-    prefs.setBoolPref("geo.testing.ignore_ipc_principal", true);
+    prefs.setBoolPref("dom.testing.ignore_ipc_principal", true);
     prefs.setBoolPref("geo.wifi.scan", false);
   }
 
   do_test_pending();
 
   geolocation = Cc["@mozilla.org/geolocation;1"].createInstance(Ci.nsISupports);
   let watchID1 = geolocation.watchPosition(successCallback, errorCallback);
   watchID2 = geolocation.watchPosition(successCallback, errorCallback,
--- a/dom/tests/unit/test_geolocation_reset_accuracy_wrap.js
+++ b/dom/tests/unit/test_geolocation_reset_accuracy_wrap.js
@@ -49,17 +49,17 @@ function run_test()
   Components.manager.nsIComponentRegistrar.registerFactory(providerCID,
     "Unit test geo provider", providerContract, provider);
   var catMan = Components.classes["@mozilla.org/categorymanager;1"]
                          .getService(Components.interfaces.nsICategoryManager);
   catMan.nsICategoryManager.addCategoryEntry(categoryName, "unit test",
                                              providerContract, false, true);
 
   var prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
-  prefs.setBoolPref("geo.testing.ignore_ipc_principal", true);
+  prefs.setBoolPref("dom.testing.ignore_ipc_principal", true);
   prefs.setBoolPref("geo.wifi.scan", false);
 
   run_test_in_child("test_geolocation_reset_accuracy.js", check_results);
 }
 
 function check_results()
 {
   // check the provider was set to high accuracy during the test
--- a/dom/tests/unit/test_geolocation_timeout.js
+++ b/dom/tests/unit/test_geolocation_timeout.js
@@ -54,14 +54,14 @@ function run_test()
 
     httpserver = new HttpServer();
     httpserver.registerPathHandler("/geo", geoHandler);
     httpserver.start(-1);
     var prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
     prefs.setBoolPref("geo.wifi.scan", false);
     prefs.setCharPref("geo.wifi.uri", "http://localhost:" +
                       httpserver.identity.primaryPort + "/geo");
-    prefs.setBoolPref("geo.testing.ignore_ipc_principal", true);
+    prefs.setBoolPref("dom.testing.ignore_ipc_principal", true);
   }
 
   geolocation = Cc["@mozilla.org/geolocation;1"].getService(Ci.nsISupports);
   geolocation.getCurrentPosition(successCallback, errorCallback, {timeout: 2000});
 }
--- a/dom/tests/unit/test_geolocation_timeout_wrap.js
+++ b/dom/tests/unit/test_geolocation_timeout_wrap.js
@@ -9,11 +9,11 @@ var httpserver = null;
 function run_test() {
   var prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
   prefs.setBoolPref("geo.wifi.scan", false);
 
   httpserver = new HttpServer();
   httpserver.start(-1);
   prefs.setCharPref("geo.wifi.uri", "http://localhost:" +
                     httpserver.identity.primaryPort + "/geo");
-  prefs.setBoolPref("geo.testing.ignore_ipc_principal", true);
+  prefs.setBoolPref("dom.testing.ignore_ipc_principal", true);
   run_test_in_child("./test_geolocation_timeout.js");
 }