Bug 1966151 - Use do_get_profile if and only if ContentParent is used r=dom-core,mccr8

The existing SettingsService dependency has been removed, see also the details in bug 1966151.

But ContentParent can use RemoteSettings that equally uses IndexedDB, e.g. https://phabricator.services.mozilla.com/D247368#8587301.

Differential Revision: https://phabricator.services.mozilla.com/D249094
This commit is contained in:
Kagami Sascha Rosylight
2025-05-15 12:07:55 +00:00
committed by krosylight@mozilla.com
parent b4f3dbc6b9
commit cda07197cb
7 changed files with 9 additions and 29 deletions

View File

@@ -14,11 +14,6 @@ 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.provider.network.scan", false);
Services.prefs.setCharPref("geo.provider.network.url", "UrlNotUsedHere:");
}

View File

@@ -1,6 +1,11 @@
function run_test() {
Services.prefs.setBoolPref("geo.provider.network.scan", false);
// XPCShell does not get a profile by default. The ContentParent
// depends on the remote settings service which uses IndexedDB and
// IndexedDB needs a place where it can store databases.
do_get_profile();
Services.prefs.setBoolPref("geo.provider.network.scan", false);
Services.prefs.setCharPref("geo.provider.network.url", "UrlNotUsedHere");
run_test_in_child("./test_geolocation_position_unavailable.js");
}

View File

@@ -58,11 +58,6 @@ function geoHandler(metadata, response) {
}
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();
// only kill this test when shutdown is called on the provider.
do_test_pending();

View File

@@ -23,11 +23,6 @@ function errorCallback() {
function run_test() {
do_test_pending();
// 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);

View File

@@ -40,11 +40,6 @@ var watchID2;
function run_test() {
if (runningInParent) {
// 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();
Components.manager.nsIComponentRegistrar.registerFactory(
providerCID,
"Unit test geo provider",

View File

@@ -26,9 +26,9 @@ var provider = {
};
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.
// XPCShell does not get a profile by default. The ContentParent
// depends on the remote settings service which uses IndexedDB and
// IndexedDB needs a place where it can store databases.
do_get_profile();
Components.manager.nsIComponentRegistrar.registerFactory(

View File

@@ -39,11 +39,6 @@ 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();
httpserver = new HttpServer();
httpserver.registerPathHandler("/geo", geoHandler);
httpserver.start(-1);