Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test gets skipped with pattern: os == 'linux' && os_version == '18.04' && asan OR os == 'linux' && os_version == '18.04' && tsan OR win11_2009 && asan
- Manifest: browser/components/urlbar/tests/browser/browser.toml
/* Any copyright is dedicated to the Public Domain.
add_task(async function () {
// Test that Ctrl/Cmd + K will focus the url bar
let focusPromise = BrowserTestUtils.waitForEvent(gURLBar, "focus");
document.documentElement.focus();
EventUtils.synthesizeKey("k", { accelKey: true });
await focusPromise;
Assert.equal(
document.activeElement,
gURLBar.inputField,
"URL Bar should be focused"
);
});