browser_aboutaddons_blanktab.js (901B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 add_task(async function testBlankTabReusedAboutAddons() { 6 await BrowserTestUtils.withNewTab({ gBrowser }, async browser => { 7 let tabCount = gBrowser.tabs.length; 8 is(browser, gBrowser.selectedBrowser, "New tab is selected"); 9 10 // Opening about:addons shouldn't change the selected tab. 11 BrowserAddonUI.openAddonsMgr(); 12 13 is(browser, gBrowser.selectedBrowser, "No new tab was opened"); 14 15 // Wait for about:addons to load. 16 await BrowserTestUtils.browserLoaded(browser); 17 18 is( 19 browser.currentURI.spec, 20 "about:addons", 21 "about:addons should load into blank tab." 22 ); 23 24 is(gBrowser.tabs.length, tabCount, "Still the same number of tabs"); 25 }); 26 });