Bug 1613627 - Rename all 'geo.wifi' related preferences to match the 'geo.provider.' convention and move default values to all.js. r=garvan
authorMike de Boer <mdeboer@mozilla.com>
Thu, 06 Feb 2020 14:50:22 +0000
changeset 512866 261683a6e3511bcfde9afc46ef120a8223041ced
parent 512865 a1319eac358f48bba1281d9d84192f8a0b624579
child 512867 ed077a95bbc4cb8e6c7eb494ba767067ed1f6692
push id37100
push userapavel@mozilla.com
push dateFri, 07 Feb 2020 21:53:54 +0000
treeherdermozilla-central@882200a11bcf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgarvan
bugs1613627
milestone74.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 1613627 - Rename all 'geo.wifi' related preferences to match the 'geo.provider.' convention and move default values to all.js. r=garvan Differential Revision: https://phabricator.services.mozilla.com/D50209
browser/app/profile/firefox.js
browser/components/resistfingerprinting/test/mochitest/test_geolocation.html
dom/system/NetworkGeolocationProvider.jsm
dom/tests/browser/browser_bug1238427.js
dom/tests/mochitest/geolocation/crossorigin_iframe.html
dom/tests/mochitest/geolocation/geolocation_common.js
dom/tests/mochitest/geolocation/test_handlerSpinsEventLoop.html
dom/tests/unit/test_geolocation_position_unavailable.js
dom/tests/unit/test_geolocation_position_unavailable_wrap.js
dom/tests/unit/test_geolocation_provider.js
dom/tests/unit/test_geolocation_provider_timeout.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
modules/libpref/init/all.js
testing/profiles/common/user.js
testing/profiles/unittest-required/user.js
toolkit/components/extensions/test/mochitest/test_ext_geolocation.html
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1386,38 +1386,16 @@ pref("security.insecure_connection_text.
 // 1 = allow MITM for certificate pinning checks.
 pref("security.cert_pinning.enforcement_level", 1);
 
 
 // If this turns true, Moz*Gesture events are not called stopPropagation()
 // before content.
 pref("dom.debug.propagate_gesture_events_through_content", false);
 
-// All the Geolocation preferences are here.
-//
-#ifndef EARLY_BETA_OR_EARLIER
-  pref("geo.wifi.uri", "https://www.googleapis.com/geolocation/v1/geolocate?key=%GOOGLE_LOCATION_SERVICE_API_KEY%");
-#else
-  // Use MLS on Nightly and early Beta.
-  pref("geo.wifi.uri", "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%");
-#endif
-
-#ifdef XP_MACOSX
-  pref("geo.provider.use_corelocation", true);
-#endif
-
-// Set to false if things are really broken.
-#ifdef XP_WIN
-  pref("geo.provider.ms-windows-location", true);
-#endif
-
-#if defined(MOZ_WIDGET_GTK) && defined(MOZ_GPSD)
-  pref("geo.provider.use_gpsd", true);
-#endif
-
 // CustomizableUI debug logging.
 pref("browser.uiCustomization.debug", false);
 
 // CustomizableUI state of the browser's user interface
 pref("browser.uiCustomization.state", "");
 
 // If set to false, FxAccounts and Sync will be unavailable.
 // A restart is mandatory after flipping that preference.
--- a/browser/components/resistfingerprinting/test/mochitest/test_geolocation.html
+++ b/browser/components/resistfingerprinting/test/mochitest/test_geolocation.html
@@ -15,19 +15,19 @@ https://bugzilla.mozilla.org/show_bug.cg
   /** Test for Bug 1372069 **/
   /** Modified for Bug 1441295 **/
   SimpleTest.waitForExplicitFinish();
   window.onload = () => {
     SimpleTest.waitForFocus(() => {
       SpecialPowers.pushPrefEnv({"set":
         [
           ["privacy.resistFingerprinting", true],
-          ["geo.prompt.testing",           true],
-          ["geo.prompt.testing.allow",     true],
-          ["geo.wifi.uri",         BASE_GEO_URL],
+          ["geo.prompt.testing", true],
+          ["geo.prompt.testing.allow", true],
+          ["geo.provider.network.url", BASE_GEO_URL],
         ],
       }, doTest_getCurrentPosition);
     }, window);
   };
 
   function doTest_getCurrentPosition() {
     navigator.geolocation.getCurrentPosition(
       (position) => {
--- a/dom/system/NetworkGeolocationProvider.jsm
+++ b/dom/system/NetworkGeolocationProvider.jsm
@@ -146,17 +146,17 @@ var gDebugCacheReasoning = ""; // for lo
 // In other cases, MLS is known to produce better/worse accuracy based on the
 // inputs, so base the decision on that.
 function isCachedRequestMoreAccurateThanServerRequest(newCell, newWifiList) {
   gDebugCacheReasoning = "";
   let isNetworkRequestCacheEnabled = true;
   try {
     // Mochitest needs this pref to simulate request failure
     isNetworkRequestCacheEnabled = Services.prefs.getBoolPref(
-      "geo.wifi.debug.requestCache.enabled"
+      "geo.provider.network.debug.requestCache.enabled"
     );
     if (!isNetworkRequestCacheEnabled) {
       gCachedRequest = null;
     }
   } catch (e) {}
 
   if (!gCachedRequest || !isNetworkRequestCacheEnabled) {
     gDebugCacheReasoning = "No cached data";
@@ -247,24 +247,27 @@ function WifiGeoPositionObject(lat, lng,
 }
 
 WifiGeoPositionObject.prototype = {
   QueryInterface: ChromeUtils.generateQI([Ci.nsIDOMGeoPosition]),
 };
 
 function WifiGeoPositionProvider() {
   gLoggingEnabled = Services.prefs.getBoolPref(
-    "geo.wifi.logging.enabled",
+    "geo.provider.network.logging.enabled",
     false
   );
   gLocationRequestTimeout = Services.prefs.getIntPref(
-    "geo.wifi.timeToWaitBeforeSending",
+    "geo.provider.network.timeToWaitBeforeSending",
     5000
   );
-  gWifiScanningEnabled = Services.prefs.getBoolPref("geo.wifi.scan", true);
+  gWifiScanningEnabled = Services.prefs.getBoolPref(
+    "geo.provider.network.scan",
+    true
+  );
 
   this.wifiService = null;
   this.timer = null;
   this.started = false;
 }
 
 WifiGeoPositionProvider.prototype = {
   classID: Components.ID("{77DA64D3-7458-4920-9491-86CC9914F904}"),
@@ -399,31 +402,31 @@ WifiGeoPositionProvider.prototype = {
       gCachedRequest.location.timestamp = Date.now();
       if (this.listener) {
         this.listener.update(gCachedRequest.location);
       }
       return;
     }
 
     // From here on, do a network geolocation request //
-    let url = Services.urlFormatter.formatURLPref("geo.wifi.uri");
+    let url = Services.urlFormatter.formatURLPref("geo.provider.network.url");
     LOG("Sending request");
 
     let xhr = new XMLHttpRequest();
     try {
       xhr.open("POST", url, true);
       xhr.channel.loadFlags = Ci.nsIChannel.LOAD_ANONYMOUS;
     } catch (e) {
       notifyPositionUnavailable(this.listener);
       return;
     }
     xhr.setRequestHeader("Content-Type", "application/json; charset=UTF-8");
     xhr.responseType = "json";
     xhr.mozBackgroundRequest = true;
-    xhr.timeout = Services.prefs.getIntPref("geo.wifi.xhr.timeout");
+    xhr.timeout = Services.prefs.getIntPref("geo.provider.network.timeout");
     xhr.ontimeout = () => {
       LOG("Location request XHR timed out.");
       notifyPositionUnavailable(this.listener);
     };
     xhr.onerror = () => {
       notifyPositionUnavailable(this.listener);
     };
     xhr.onload = () => {
--- a/dom/tests/browser/browser_bug1238427.js
+++ b/dom/tests/browser/browser_bug1238427.js
@@ -13,17 +13,20 @@ const BASE_GEO_URL =
   "http://mochi.test:8888/tests/dom/tests/mochitest/geolocation/network_geolocation.sjs";
 
 add_task(async function() {
   Services.prefs.setBoolPref("geo.prompt.testing", true);
   Services.prefs.setBoolPref("geo.prompt.testing.allow", true);
 
   // Make the geolocation provider responder very slowly to ensure that
   // it does not reply before we close the tab.
-  Services.prefs.setCharPref("geo.wifi.uri", BASE_GEO_URL + "?delay=100000");
+  Services.prefs.setCharPref(
+    "geo.provider.network.url",
+    BASE_GEO_URL + "?delay=100000"
+  );
 
   // Open the test URI and close it. The test harness will make sure that the
   // page is cleaned up after some GCs. If geolocation is not shut down properly,
   // it will show up as a non-shutdown leak.
   await BrowserTestUtils.withNewTab(
     {
       gBrowser,
       url: TEST_URI,
--- a/dom/tests/mochitest/geolocation/crossorigin_iframe.html
+++ b/dom/tests/mochitest/geolocation/crossorigin_iframe.html
@@ -6,20 +6,20 @@
 /**
   Runs inside iframe in test_crossorigin_iframe.html.
 */
 
 const BASE_GEO_URL = "http://mochi.test:8888/tests/dom/tests/mochitest/geolocation/network_geolocation.sjs";
 var pushPrefs = (...p) => SpecialPowers.pushPrefEnv({set: p});
 
 (async () => {
-  await pushPrefs(["geo.wifi.debug.requestCache.enabled", false],
-                  ["geo.prompt.testing",                   true],
-                  ["geo.prompt.testing.allow",             true],
-                  ["geo.wifi.uri",                 BASE_GEO_URL]);
+  await pushPrefs(["geo.provider.network.debug.requestCache.enabled", false],
+                  ["geo.prompt.testing", true],
+                  ["geo.prompt.testing.allow", true],
+                  ["geo.provider.network.url", BASE_GEO_URL]);
 
   navigator.geolocation.getCurrentPosition(() => {
     navigator.geolocation.watchPosition(() => {
       parent.postMessage("allowed", "*");
     }, () => {
       parent.postMessage("denied", "*");
     });
   }, () => {
--- a/dom/tests/mochitest/geolocation/geolocation_common.js
+++ b/dom/tests/mochitest/geolocation/geolocation_common.js
@@ -5,19 +5,22 @@ var harness =
 var BASE_URL =
   "http://mochi.test:8888/" +
   harness +
   "/dom/tests/mochitest/geolocation/network_geolocation.sjs";
 
 function set_geo_wifi_uri(uri, callback) {
   // Disable NetworkGeolocationProvider.js request cache because the cache
   // does not remember from which location service it came from. We expect
-  // different results when we change the provider URL (geo.wifi.uri).
+  // different results when we change the provider URL (geo.provider.network.url).
   set_network_request_cache_enabled(false, () => {
-    SpecialPowers.pushPrefEnv({ set: [["geo.wifi.uri", uri]] }, callback);
+    SpecialPowers.pushPrefEnv(
+      { set: [["geo.provider.network.url", uri]] },
+      callback
+    );
   });
 }
 
 function sleep(delay) {
   var start = Date.now();
   while (Date.now() < start + delay) {}
 }
 
@@ -51,17 +54,17 @@ function stop_geolocationProvider(callba
     // we need to be sure that all location data has been purged/set.
     sleep(1000);
     callback.call();
   });
 }
 
 function set_network_request_cache_enabled(enabled, callback) {
   SpecialPowers.pushPrefEnv(
-    { set: [["geo.wifi.debug.requestCache.enabled", enabled]] },
+    { set: [["geo.provider.network.debug.requestCache.enabled", enabled]] },
     callback
   );
 }
 
 function worse_geolocationProvider(callback) {
   set_geo_wifi_uri(BASE_URL + "?action=worse-accuracy", callback);
 }
 
--- a/dom/tests/mochitest/geolocation/test_handlerSpinsEventLoop.html
+++ b/dom/tests/mochitest/geolocation/test_handlerSpinsEventLoop.html
@@ -52,17 +52,17 @@ function errorCallback(error) {
 function check() {
   ok(successCallbackCalled != errorCallbackCalled, "Ensure only one callback is called");
   SimpleTest.finish();
 }
 
 var timeoutPassed = false;
 var timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
 function test1() {
-  SpecialPowers.pushPrefEnv({"set": [["geo.wifi.timeToWaitBeforeSending", 10]]}, function() {
+  SpecialPowers.pushPrefEnv({"set": [["geo.provider.network.timeToWaitBeforeSending", 10]]}, function() {
     navigator.geolocation.getCurrentPosition(successCallback, errorCallback, {timeout: 500});
     timer.initWithCallback(timer => {
       timeoutPassed = true;
     }, 600, Ci.nsITimer.TYPE_ONE_SHOT);
   });
 }
 </script>
 </pre>
--- a/dom/tests/unit/test_geolocation_position_unavailable.js
+++ b/dom/tests/unit/test_geolocation_position_unavailable.js
@@ -16,16 +16,16 @@ function run_test() {
   do_test_pending();
 
   if (Services.appinfo.processType == Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT) {
     // XPCShell does not get a profile by default. The geolocation service
     // depends on the settings service which uses IndexedDB and IndexedDB
     // needs a place where it can store databases.
     do_get_profile();
 
-    Services.prefs.setBoolPref("geo.wifi.scan", false);
-    Services.prefs.setCharPref("geo.wifi.uri", "UrlNotUsedHere:");
+    Services.prefs.setBoolPref("geo.provider.network.scan", false);
+    Services.prefs.setCharPref("geo.provider.network.url", "UrlNotUsedHere:");
     Services.prefs.setBoolPref("dom.testing.ignore_ipc_principal", true);
   }
 
   var geolocation = Cc["@mozilla.org/geolocation;1"].getService(Ci.nsISupports);
   geolocation.getCurrentPosition(successCallback, errorCallback);
 }
--- a/dom/tests/unit/test_geolocation_position_unavailable_wrap.js
+++ b/dom/tests/unit/test_geolocation_position_unavailable_wrap.js
@@ -1,9 +1,9 @@
 const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 function run_test() {
-  Services.prefs.setBoolPref("geo.wifi.scan", false);
+  Services.prefs.setBoolPref("geo.provider.network.scan", false);
 
-  Services.prefs.setCharPref("geo.wifi.uri", "UrlNotUsedHere");
+  Services.prefs.setCharPref("geo.provider.network.url", "UrlNotUsedHere");
   Services.prefs.setBoolPref("dom.testing.ignore_ipc_principal", true);
   run_test_in_child("./test_geolocation_position_unavailable.js");
 }
--- a/dom/tests/unit/test_geolocation_provider.js
+++ b/dom/tests/unit/test_geolocation_provider.js
@@ -65,21 +65,21 @@ function run_test() {
   // only kill this test when shutdown is called on the provider.
   do_test_pending();
 
   httpserver = new HttpServer();
   httpserver.registerPathHandler("/geo", geoHandler);
   httpserver.start(-1);
 
   Services.prefs.setCharPref(
-    "geo.wifi.uri",
+    "geo.provider.network.url",
     "http://localhost:" + httpserver.identity.primaryPort + "/geo"
   );
   Services.prefs.setBoolPref("dom.testing.ignore_ipc_principal", true);
-  Services.prefs.setBoolPref("geo.wifi.scan", false);
+  Services.prefs.setBoolPref("geo.provider.network.scan", false);
 
   var obs = Cc["@mozilla.org/observer-service;1"].getService();
   obs = obs.QueryInterface(Ci.nsIObserverService);
   obs.addObserver(observer, "geolocation-device-events");
 
   geolocation = Cc["@mozilla.org/geolocation;1"].getService(Ci.nsISupports);
   watchID = geolocation.watchPosition(successCallback, errorCallback);
 }
--- a/dom/tests/unit/test_geolocation_provider_timeout.js
+++ b/dom/tests/unit/test_geolocation_provider_timeout.js
@@ -26,20 +26,20 @@ function run_test() {
   // depends on the settings service which uses IndexedDB and IndexedDB
   // needs a place where it can store databases.
   do_get_profile();
 
   httpserver = new HttpServer();
   httpserver.registerPathHandler("/geo", geoHandler);
   httpserver.start(-1);
   Services.prefs.setCharPref(
-    "geo.wifi.uri",
+    "geo.provider.network.url",
     "http://localhost:" + httpserver.identity.primaryPort + "/geo"
   );
   Services.prefs.setBoolPref("dom.testing.ignore_ipc_principal", true);
-  Services.prefs.setBoolPref("geo.wifi.scan", false);
+  Services.prefs.setBoolPref("geo.provider.network.scan", false);
 
   // Setting timeout to a very low value to ensure time out will happen.
-  Services.prefs.setIntPref("geo.wifi.xhr.timeout", 5);
+  Services.prefs.setIntPref("geo.provider.network.timeout", 5);
 
   geolocation = Cc["@mozilla.org/geolocation;1"].getService(Ci.nsISupports);
   geolocation.getCurrentPosition(successCallback, errorCallback);
 }
--- a/dom/tests/unit/test_geolocation_reset_accuracy.js
+++ b/dom/tests/unit/test_geolocation_reset_accuracy.js
@@ -64,17 +64,17 @@ function run_test() {
       categoryName,
       "unit test",
       providerContract,
       false,
       true
     );
 
     Services.prefs.setBoolPref("dom.testing.ignore_ipc_principal", true);
-    Services.prefs.setBoolPref("geo.wifi.scan", false);
+    Services.prefs.setBoolPref("geo.provider.network.scan", false);
   }
 
   do_test_pending();
 
   geolocation = Cc["@mozilla.org/geolocation;1"].createInstance(Ci.nsISupports);
   geolocation.watchPosition(successCallback, errorCallback);
   watchID2 = geolocation.watchPosition(successCallback, errorCallback, {
     enableHighAccuracy: true,
--- a/dom/tests/unit/test_geolocation_reset_accuracy_wrap.js
+++ b/dom/tests/unit/test_geolocation_reset_accuracy_wrap.js
@@ -50,17 +50,17 @@ function run_test() {
     categoryName,
     "unit test",
     providerContract,
     false,
     true
   );
 
   Services.prefs.setBoolPref("dom.testing.ignore_ipc_principal", true);
-  Services.prefs.setBoolPref("geo.wifi.scan", false);
+  Services.prefs.setBoolPref("geo.provider.network.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
   Assert.ok(provider._seenHigh);
   // check the provider is not currently set to high accuracy
--- a/dom/tests/unit/test_geolocation_timeout.js
+++ b/dom/tests/unit/test_geolocation_timeout.js
@@ -43,19 +43,19 @@ function run_test() {
     // XPCShell does not get a profile by default. The geolocation service
     // depends on the settings service which uses IndexedDB and IndexedDB
     // needs a place where it can store databases.
     do_get_profile();
 
     httpserver = new HttpServer();
     httpserver.registerPathHandler("/geo", geoHandler);
     httpserver.start(-1);
-    Services.prefs.setBoolPref("geo.wifi.scan", false);
+    Services.prefs.setBoolPref("geo.provider.network.scan", false);
     Services.prefs.setCharPref(
-      "geo.wifi.uri",
+      "geo.provider.network.url",
       "http://localhost:" + httpserver.identity.primaryPort + "/geo"
     );
     Services.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
@@ -1,17 +1,17 @@
 const { HttpServer } = ChromeUtils.import("resource://testing-common/httpd.js");
 const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var httpserver = null;
 
 function run_test() {
-  Services.prefs.setBoolPref("geo.wifi.scan", false);
+  Services.prefs.setBoolPref("geo.provider.network.scan", false);
 
   httpserver = new HttpServer();
   httpserver.start(-1);
   Services.prefs.setCharPref(
-    "geo.wifi.uri",
+    "geo.provider.network.url",
     "http://localhost:" + httpserver.identity.primaryPort + "/geo"
   );
   Services.prefs.setBoolPref("dom.testing.ignore_ipc_principal", true);
   run_test_in_child("./test_geolocation_timeout.js");
 }
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -4025,18 +4025,40 @@ pref("network.psl.onUpdate_notify", fals
 #ifdef MOZ_WIDGET_GTK
   pref("gfx.xrender.enabled",false);
   pref("widget.content.gtk-theme-override", "");
 #endif
 #ifdef MOZ_WAYLAND
   pref("widget.wayland_vsync.enabled", false);
 #endif
 
-// Timeout for outbound network geolocation provider XHR
-pref("geo.wifi.xhr.timeout", 60000);
+// All the Geolocation preferences are here.
+//
+#ifndef EARLY_BETA_OR_EARLIER
+  pref("geo.provider.network.url", "https://www.googleapis.com/geolocation/v1/geolocate?key=%GOOGLE_LOCATION_SERVICE_API_KEY%");
+#else
+  // Use MLS on Nightly and early Beta.
+  pref("geo.provider.network.url", "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%");
+#endif
+
+// Timeout for outbound network geolocation provider.
+pref("geo.provider.network.timeout", 60000);
+
+#ifdef XP_MACOSX
+  pref("geo.provider.use_corelocation", true);
+#endif
+
+// Set to false if things are really broken.
+#ifdef XP_WIN
+  pref("geo.provider.ms-windows-location", true);
+#endif
+
+#if defined(MOZ_WIDGET_GTK) && defined(MOZ_GPSD)
+  pref("geo.provider.use_gpsd", true);
+#endif
 
 // Enable/Disable the device storage API for content
 pref("device.storage.enabled", false);
 
 // Push/Pop/Replace State prefs
 pref("browser.history.maxStateObjectSize", 2097152);
 
 pref("browser.meta_refresh_when_inactive.disabled", false);
--- a/testing/profiles/common/user.js
+++ b/testing/profiles/common/user.js
@@ -62,8 +62,10 @@ user_pref("media.autoplay.enabled.user-g
 user_pref("media.autoplay.ask-permission", false);
 user_pref("media.autoplay.block-webaudio", false);
 user_pref("media.allowed-to-play.enabled", true);
 // Ensure media can always play without delay
 user_pref("media.block-autoplay-until-in-foreground", false);
 user_pref("toolkit.telemetry.coverage.endpoint.base", "http://localhost");
 // Don't ask for a request in testing unless explicitly set this as true.
 user_pref("media.geckoview.autoplay.request", false);
+// user_pref("geo.provider.network.url", "http://localhost/geoip-dummy");
+user_pref("geo.provider-country.network.url", "http://localhost/geoip-dummy");
--- a/testing/profiles/unittest-required/user.js
+++ b/testing/profiles/unittest-required/user.js
@@ -123,20 +123,20 @@ user_pref("findbar.highlightAll", false)
 user_pref("findbar.modalHighlight", false);
 // Existing tests assume there is no font size inflation.
 user_pref("font.size.inflation.emPerLine", 0);
 user_pref("font.size.inflation.minTwips", 0);
 user_pref("general.useragent.updates.url", "https://example.com/0/%APP_ID%");
 // Always use network provider for geolocation tests
 // so we bypass the OSX dialog raised by the corelocation provider
 user_pref("geo.provider.testing", true);
-user_pref("geo.wifi.logging.enabled", true);
-user_pref("geo.wifi.scan", false);
-user_pref("geo.wifi.timeToWaitBeforeSending", 2000);
-user_pref("geo.wifi.uri", "http://{server}/tests/dom/tests/mochitest/geolocation/network_geolocation.sjs");
+user_pref("geo.provider.network.logging.enabled", true);
+user_pref("geo.provider.network.scan", false);
+user_pref("geo.provider.network.timeToWaitBeforeSending", 2000);
+user_pref("geo.provider.network.url", "http://{server}/tests/dom/tests/mochitest/geolocation/network_geolocation.sjs");
 user_pref("gfx.color_management.force_srgb", true);
 user_pref("gfx.logging.level", 1);
 // We don't want to hit the real Firefox Accounts server for tests.  We don't
 // actually need a functioning FxA server, so just set it to something that
 // resolves and accepts requests, even if they all fail.
 user_pref("identity.fxaccounts.auth.uri", "https://{server}/fxa-dummy/");
 // Ditto for all the FxA content root URI.
 user_pref("identity.fxaccounts.remote.root", "https://{server}/");
--- a/toolkit/components/extensions/test/mochitest/test_ext_geolocation.html
+++ b/toolkit/components/extensions/test/mochitest/test_ext_geolocation.html
@@ -7,17 +7,17 @@
   <script src="/tests/SimpleTest/ExtensionTestUtils.js"></script>
   <script type="text/javascript" src="head.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
 <script>
 "use strict";
 
 add_task(async function test_geolocation_nopermission() {
   let GEO_URL = "http://mochi.test:8888/tests/dom/tests/mochitest/geolocation/network_geolocation.sjs";
-  await SpecialPowers.pushPrefEnv({"set": [["geo.wifi.uri", GEO_URL]]});
+  await SpecialPowers.pushPrefEnv({"set": [["geo.provider.network.url", GEO_URL]]});
 });
 
 add_task(async function test_geolocation() {
   let extension = ExtensionTestUtils.loadExtension({
     manifest: {
       permissions: [
         "geolocation",
       ],