Bug 1776578 - Replace init tasks with add_setup in mochitests. r=application-update-reviewers,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D149486
This commit is contained in:
@@ -44,7 +44,7 @@ function promiseTestOnWindow(aIsPrivate, aValue) {
|
||||
})();
|
||||
}
|
||||
|
||||
add_task(async function init() {
|
||||
add_setup(async function() {
|
||||
forgetClosedWindows();
|
||||
while (ss.getClosedTabCount(window) > 0) {
|
||||
ss.forgetClosedTab(window, 0);
|
||||
|
||||
@@ -22,7 +22,7 @@ async function reInitSessionFile() {
|
||||
await SessionFile.read();
|
||||
}
|
||||
|
||||
add_task(async function init() {
|
||||
add_setup(async function() {
|
||||
// Make sure that we are not racing with SessionSaver's time based
|
||||
// saves.
|
||||
Services.prefs.setIntPref(PREF_SS_INTERVAL, 10000000);
|
||||
|
||||
@@ -34,7 +34,7 @@ function getClosedState() {
|
||||
|
||||
var CLOSED_STATE;
|
||||
|
||||
add_task(async function init() {
|
||||
add_setup(async function() {
|
||||
forgetClosedWindows();
|
||||
while (ss.getClosedTabCount(window) > 0) {
|
||||
ss.forgetClosedTab(window, 0);
|
||||
|
||||
@@ -9,7 +9,7 @@ const HISTOGRAM_NAME = "FX_SESSION_RESTORE_SEND_UPDATE_CAUSED_OOM";
|
||||
* to Telemetry.
|
||||
*/
|
||||
|
||||
add_task(async function init() {
|
||||
add_setup(async function() {
|
||||
Services.telemetry.canRecordExtended = true;
|
||||
});
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ async function getUpgradeBackups() {
|
||||
return children.filter(path => path.startsWith(Paths.upgradeBackupPrefix));
|
||||
}
|
||||
|
||||
add_task(async function init() {
|
||||
add_setup(async function() {
|
||||
// Wait until initialization is complete
|
||||
await SessionStore.promiseInitialized;
|
||||
});
|
||||
|
||||
@@ -25,7 +25,7 @@ updateAppInfo({
|
||||
platformVersion: "",
|
||||
});
|
||||
|
||||
add_task(async function init() {
|
||||
add_setup(async function() {
|
||||
let source = do_get_file("data/sessionstore_valid.js");
|
||||
source.copyTo(profd, "sessionstore.js");
|
||||
await writeCompressedFile(Paths.clean.replace("jsonlz4", "js"), Paths.clean);
|
||||
|
||||
Reference in New Issue
Block a user