Bug 1819176 - Set default extension.startupReason for our tests, r=rpl

Differential Revision: https://phabricator.services.mozilla.com/D171169
This commit is contained in:
Tomislav Jovanovic 2023-03-14 12:12:35 +00:00
parent 8d249fa588
commit 79b06ec49d
2 changed files with 17 additions and 2 deletions

View File

@ -701,7 +701,7 @@ ExtensionTestCommon = class ExtensionTestCommon {
// By default we set TEST_NO_DELAYED_STARTUP to true
TEST_NO_DELAYED_STARTUP: !data.delayedStartup,
},
data.startupReason
data.startupReason ?? "ADDON_INSTALL"
);
}
};

View File

@ -102,7 +102,7 @@ function assertTelemetryEvents(expectedEvents) {
});
}
add_task(async function setup() {
add_setup(async function setup() {
Services.prefs.setBoolPref(ExtensionStorageIDB.BACKEND_ENABLED_PREF, true);
await promiseStartupManager();
@ -437,6 +437,9 @@ add_task(async function test_extensionId_trimmed_in_telemetry_event() {
},
},
background,
// We don't want the (default) startupReason ADDON_INSTALL because
// that automatically sets the migrated pref and skips migration.
startupReason: "APP_STARTUP",
});
await extension.startup();
@ -521,6 +524,9 @@ add_task(async function test_storage_local_corrupted_data_migration() {
},
},
background,
// We don't want the (default) startupReason ADDON_INSTALL because
// that automatically sets the migrated pref and skips migration.
startupReason: "APP_STARTUP",
});
await extension.startup();
@ -612,6 +618,9 @@ add_task(async function test_storage_local_data_migration_failure() {
},
},
background,
// We don't want the (default) startupReason ADDON_INSTALL because
// that automatically sets the migrated pref and skips migration.
startupReason: "APP_STARTUP",
});
await extension.startup();
@ -665,6 +674,9 @@ add_task(async function test_migration_aborted_on_shutdown() {
},
},
},
// We don't want the (default) startupReason ADDON_INSTALL because
// that automatically sets the migrated pref and skips migration.
startupReason: "APP_STARTUP",
});
await extension.startup();
@ -754,6 +766,9 @@ async function test_quota_exceeded_while_migrating_data() {
browser.test.sendMessage("bg-page:ready");
},
// We don't want the (default) startupReason ADDON_INSTALL because
// that automatically sets the migrated pref and skips migration.
startupReason: "APP_STARTUP",
});
await extension.startup();