browser_bug565575.js (587B)
1 add_task(async function () { 2 gBrowser.selectedBrowser.focus(); 3 4 await BrowserTestUtils.openNewForegroundTab( 5 gBrowser, 6 () => BrowserCommands.openTab(), 7 false 8 ); 9 ok(gURLBar.focused, "location bar is focused for a new tab"); 10 11 await BrowserTestUtils.switchTab(gBrowser, gBrowser.tabs[0]); 12 ok( 13 !gURLBar.focused, 14 "location bar isn't focused for the previously selected tab" 15 ); 16 17 await BrowserTestUtils.switchTab(gBrowser, gBrowser.tabs[1]); 18 ok(gURLBar.focused, "location bar is re-focused when selecting the new tab"); 19 20 gBrowser.removeCurrentTab(); 21 });