Bug 1461242 - Adding a TabState flush would be cheating, so add a wait to allow some time for the cache to be populated. r=dao

Differential Revision: https://phabricator.services.mozilla.com/D46290

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mike de Boer 2019-12-03 10:46:01 +00:00
parent fa450bc146
commit 5ccf884103

View File

@ -23,7 +23,10 @@ add_task(async function() {
let before = TabStateCache.get(aBrowser);
let newTab = SessionStore.duplicateTab(window, tab);
await BrowserTestUtils.browserLoaded(newTab.linkedBrowser);
await Promise.all([
BrowserTestUtils.browserLoaded(newTab.linkedBrowser),
TestUtils.topicObserved("sessionstore-debug-tab-restored"),
]);
let after = TabStateCache.get(newTab.linkedBrowser);
isnot(