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:
Morgan Reschenberg 2020-04-13 20:20:03 +00:00
parent dece0b0c31
commit 8e22125381

View File

@ -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();
}
);