browser_open_migration_wizard.js (820B)
1 /* Any copyright is dedicated to the Public Domain. 2 http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 "use strict"; 5 6 /** 7 * Tests the "Import Data" button in the "Import Browser Data" section of 8 * the General pane of about:preferences launches the Migration Wizard. 9 */ 10 add_task(async function test_open_migration_wizard() { 11 const BUTTON_ID = "data-migration"; 12 13 await BrowserTestUtils.withNewTab( 14 { gBrowser, url: "about:preferences#general" }, 15 async function (browser) { 16 let button = browser.contentDocument.getElementById(BUTTON_ID); 17 18 let wizardReady = BrowserTestUtils.waitForEvent( 19 browser.contentWindow, 20 "MigrationWizard:Ready" 21 ); 22 button.click(); 23 await wizardReady; 24 Assert.ok(true, "Saw the new Migration Wizard dialog open."); 25 } 26 ); 27 });