browser_open_in_lazy_tab.js (1021B)
1 "use strict"; 2 3 /** 4 * Check that customize mode can be loaded in a lazy tab. 5 */ 6 add_task(async function open_customize_mode_in_lazy_tab() { 7 let tab = BrowserTestUtils.addTab(gBrowser, "about:blank", { 8 createLazyBrowser: true, 9 }); 10 gCustomizeMode.setTab(tab); 11 12 is(tab.linkedPanel, null, "Tab should be lazy"); 13 14 let title = gNavigatorBundle.getFormattedString("customizeMode.tabTitle", [ 15 document.getElementById("bundle_brand").getString("brandShortName"), 16 ]); 17 is(tab.label, title, "Tab should have correct title"); 18 19 let customizePromise = BrowserTestUtils.waitForEvent( 20 gNavToolbox, 21 "customizationready" 22 ); 23 gCustomizeMode.enter(); 24 await customizePromise; 25 26 is( 27 tab.getAttribute("customizemode"), 28 "true", 29 "Tab should be in customize mode" 30 ); 31 32 let customizationContainer = document.getElementById( 33 "customization-container" 34 ); 35 is( 36 customizationContainer.hidden, 37 false, 38 "Customization container should be visible" 39 ); 40 41 await endCustomizing(); 42 });