forked from BrowserWorks/Waterfox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1538158 - Clicking the history dropmarker should initiate an empt…
…y search instead of searching for the loaded URL. r=adw Differential Revision: https://phabricator.services.mozilla.com/D25059 --HG-- extra : moz-landing-system : lando
- Loading branch information
1 parent
9fb5e17
commit ebf1e69
Showing
3 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
browser/components/urlbar/tests/browser/browser_dropmarker.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* Any copyright is dedicated to the Public Domain. | ||
* http://creativecommons.org/publicdomain/zero/1.0/ | ||
*/ | ||
|
||
"use strict"; | ||
|
||
add_task(async function() { | ||
await BrowserTestUtils.withNewTab({ gBrowser, url: "http://example.com/" }, async () => { | ||
await UrlbarTestUtils.promisePopupOpen(window, () => { | ||
let historyDropMarker = | ||
window.document.getAnonymousElementByAttribute(gURLBar.textbox, "anonid", "historydropmarker"); | ||
EventUtils.synthesizeMouseAtCenter(historyDropMarker, {}, window); | ||
}); | ||
let queryContext = await gURLBar.lastQueryContextPromise; | ||
is(queryContext.searchString, "", | ||
"Clicking the history dropmarker should initiate an empty search instead of searching for the loaded URL"); | ||
await UrlbarTestUtils.promisePopupClose(window); | ||
}); | ||
}); |