mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Bug 1701412: Use bookmark instead of visit for autofill r=eeejay
Previously we relied on adding a visit to prompt the URL bar to autofill, that worked because nightly and release shipped with bookmarks to addons.moz. Beta, however, does not, so we should modify this test to populate the bookmark on all releases. Differential Revision: https://phabricator.services.mozilla.com/D110571
This commit is contained in:
parent
6776a9971c
commit
21cc205fff
@ -8,7 +8,6 @@ loadScripts({ name: "role.js", dir: MOCHITESTS_DIR });
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
BrowserTestUtils: "resource://testing-common/BrowserTestUtils.jsm",
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.jsm",
|
||||
UrlbarTestUtils: "resource://testing-common/UrlbarTestUtils.jsm",
|
||||
});
|
||||
|
||||
@ -21,11 +20,15 @@ async function runTests() {
|
||||
);
|
||||
info("Creating new window");
|
||||
let newWin = await BrowserTestUtils.openNewBrowserWindow();
|
||||
await PlacesTestUtils.addVisits("http://addons.mozilla.org");
|
||||
let bookmark = await PlacesUtils.bookmarks.insert({
|
||||
parentGuid: PlacesUtils.bookmarks.toolbarGuid,
|
||||
title: "addons",
|
||||
url: Services.io.newURI("http://www.addons.mozilla.org/"),
|
||||
});
|
||||
|
||||
registerCleanupFunction(async function() {
|
||||
await BrowserTestUtils.closeWindow(newWin);
|
||||
await PlacesUtils.history.clear();
|
||||
await PlacesUtils.bookmarks.remove(bookmark);
|
||||
});
|
||||
info("Focusing window");
|
||||
newWin.focus();
|
||||
|
Loading…
Reference in New Issue
Block a user