browser_bug963945.js (892B)
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 /* 6 * This test ensures the about:addons tab is only 7 * opened one time when in private browsing. 8 */ 9 10 add_task(async function test() { 11 let win = await BrowserTestUtils.openNewBrowserWindow({ private: true }); 12 13 let tab = (win.gBrowser.selectedTab = BrowserTestUtils.addTab( 14 win.gBrowser, 15 "about:addons" 16 )); 17 await BrowserTestUtils.browserLoaded(tab.linkedBrowser); 18 await promiseWaitForFocus(win); 19 20 EventUtils.synthesizeKey("a", { ctrlKey: true, shiftKey: true }, win); 21 22 is(win.gBrowser.tabs.length, 2, "about:addons tab was re-focused."); 23 is(win.gBrowser.currentURI.spec, "about:addons", "Addons tab was opened."); 24 25 await BrowserTestUtils.closeWindow(win); 26 });