mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1629167: Use PlaceTestUtils instead of manually visiting site to wipe history after runs. r=eeejay
Depends on D70095 Differential Revision: https://phabricator.services.mozilla.com/D70710 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
dece0b0c31
commit
8e22125381
@ -13,8 +13,8 @@ loadScripts(
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"BrowserTestUtils",
|
||||
"resource://testing-common/BrowserTestUtils.jsm"
|
||||
"PlacesTestUtils",
|
||||
"resource://testing-common/PlacesTestUtils.jsm"
|
||||
);
|
||||
|
||||
/**
|
||||
@ -30,13 +30,12 @@ addAccessibleTask(
|
||||
|
||||
is(link.getAttributeValue("AXVisited"), 0, "Link has not been visited");
|
||||
|
||||
let tab = await BrowserTestUtils.openNewForegroundTab(
|
||||
gBrowser,
|
||||
"http://www.example.com/"
|
||||
);
|
||||
await BrowserTestUtils.removeTab(tab);
|
||||
PlacesTestUtils.addVisits(["http://www.example.com/"]);
|
||||
|
||||
await stateChanged;
|
||||
is(link.getAttributeValue("AXVisited"), 1, "Link has been visited");
|
||||
|
||||
// Ensure history is cleared before running
|
||||
await PlacesUtils.history.clear();
|
||||
}
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user