blob: 8c9e2c9f2985987559dc4ff4623404f3d6604337 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
add_task(function*() {
// Remove the search bar from toolbar
CustomizableUI.removeWidgetFromArea("search-container");
// Test that Ctrl/Cmd + K will focus the url bar
let focusPromise = BrowserTestUtils.waitForEvent(gURLBar, "focus");
EventUtils.synthesizeKey("k", { accelKey: true });
yield focusPromise;
Assert.equal(document.activeElement, gURLBar.inputField, "URL Bar should be focused");
// Reset changes made to toolbar
CustomizableUI.reset();
});
|