Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

  • This test gets skipped with pattern: os == 'linux' && os_version == '18.04' && processor == 'x86_64' && asan OR os == 'linux' && os_version == '18.04' && processor == 'x86_64' && tsan OR win11_2009 && asan
  • Manifest: browser/components/urlbar/tests/browser/browser.toml
/* Any copyright is dedicated to the Public Domain.
"use strict";
/**
* Verify that urlbar state is reset when opening a new tab, so searching for the
* same text will reopen the results popup.
*/
add_task(async function () {
let tab = await BrowserTestUtils.openNewForegroundTab(
gBrowser,
"about:blank",
false
);
await UrlbarTestUtils.promiseAutocompleteResultPopup({
window,
value: "m",
});
assertOpen();
let tab2 = await BrowserTestUtils.openNewForegroundTab(
gBrowser,
"about:blank",
false
);
await UrlbarTestUtils.promiseAutocompleteResultPopup({
window,
value: "m",
});
assertOpen();
BrowserTestUtils.removeTab(tab);
BrowserTestUtils.removeTab(tab2);
});
function assertOpen() {
Assert.equal(gURLBar.view.isOpen, true, "Should be showing the popup");
}