1 function successCallback() {
6 function errorCallback(err) {
7 // GeolocationPositionError has no interface object, so we can't get constants off that.
8 Assert.equal(err.POSITION_UNAVAILABLE, err.code);
9 Assert.equal(2, err.code);
16 if (Services.appinfo.processType == Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT) {
17 // XPCShell does not get a profile by default. The geolocation service
18 // depends on the settings service which uses IndexedDB and IndexedDB
19 // needs a place where it can store databases.
22 Services.prefs.setBoolPref("geo.provider.network.scan", false);
23 Services.prefs.setCharPref("geo.provider.network.url", "UrlNotUsedHere:");
26 var geolocation = Cc["@mozilla.org/geolocation;1"].getService(Ci.nsISupports);
27 geolocation.getCurrentPosition(successCallback, errorCallback);