browser_file_menu_import_wizard.js (990B)
1 /* Any copyright is dedicated to the Public Domain. 2 http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 "use strict"; 5 6 add_setup(async () => { 7 // Load the initial tab at example.com. This makes it so that when the 8 // about:preferences hosting the migration wizard opens, we'll load 9 // the about:preferences page in a new tab rather than overtaking the 10 // initial one. This makes it easier to be more explicit when cleaning 11 // up because we can just remove the opened tab. 12 let browser = gBrowser.selectedBrowser; 13 BrowserTestUtils.startLoadingURIString(browser, "https://example.com"); 14 await BrowserTestUtils.browserLoaded(browser); 15 }); 16 17 add_task(async function file_menu_import_wizard() { 18 let wizardTabPromise = BrowserTestUtils.waitForMigrationWizard(window); 19 document.getElementById("menu_importFromAnotherBrowser").doCommand(); 20 let wizardTab = await wizardTabPromise; 21 ok(wizardTab, "Migration wizard tab opened"); 22 BrowserTestUtils.removeTab(wizardTab); 23 });