1
0
Fork 0
firefox/browser/base/content/test/general/browser_bug565575.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

21 lines
587 B
JavaScript

add_task(async function () {
gBrowser.selectedBrowser.focus();
await BrowserTestUtils.openNewForegroundTab(
gBrowser,
() => BrowserCommands.openTab(),
false
);
ok(gURLBar.focused, "location bar is focused for a new tab");
await BrowserTestUtils.switchTab(gBrowser, gBrowser.tabs[0]);
ok(
!gURLBar.focused,
"location bar isn't focused for the previously selected tab"
);
await BrowserTestUtils.switchTab(gBrowser, gBrowser.tabs[1]);
ok(gURLBar.focused, "location bar is re-focused when selecting the new tab");
gBrowser.removeCurrentTab();
});