1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
4 SimpleTest.requestFlakyTimeout(
5 "The test needs to let objects die asynchronously."
8 add_task(async function test_accessing_shistory() {
9 let tab = await BrowserTestUtils.openNewForegroundTab(
13 let sh = tab.linkedBrowser.browsingContext.sessionHistory;
14 ok(sh, "Should have SessionHistory object");
15 gBrowser.removeTab(tab);
17 for (let i = 0; i < 5; ++i) {
18 SpecialPowers.Services.obs.notifyObservers(
23 SpecialPowers.DOMWindowUtils.garbageCollect();
24 await new Promise(function (r) {
25 // eslint-disable-next-line mozilla/no-arbitrary-setTimeout
31 sh.reloadCurrentEntry();
33 ok(true, "This test shouldn't crash.");