1 const providerCID = Components.ID("{14aa4b81-e266-45cb-88f8-89595dece114}");
2 const providerContract = "@mozilla.org/geolocation/provider;1";
4 const categoryName = "geolocation-provider";
7 QueryInterface: ChromeUtils.generateQI([
9 "nsIGeolocationProvider",
11 createInstance: function eventsink_ci(iid) {
12 return this.QueryInterface(iid);
17 setHighAccuracy(enable) {
18 this._isHigh = enable;
20 this._seenHigh = true;
21 do_send_remote_message("high_acc_enabled");
29 // XPCShell does not get a profile by default. The geolocation service
30 // depends on the settings service which uses IndexedDB and IndexedDB
31 // needs a place where it can store databases.
34 Components.manager.nsIComponentRegistrar.registerFactory(
36 "Unit test geo provider",
41 Services.catMan.addCategoryEntry(
49 Services.prefs.setBoolPref("geo.provider.network.scan", false);
51 run_test_in_child("test_geolocation_reset_accuracy.js", check_results);
54 function check_results() {
55 // check the provider was set to high accuracy during the test
56 Assert.ok(provider._seenHigh);
57 // check the provider is not currently set to high accuracy
58 Assert.ok(!provider._isHigh);