Closed Bug 1602811 Opened 4 years ago Closed 4 years ago

[SessionHistory in the parent] Two failures in browser_447951.js

Categories

(Core :: DOM: Navigation, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1507287

People

(Reporter: alchen, Unassigned)

Details

When doing mochitest with the patch of bug 1507287 and pref " fission.sessionHistoryInParent", there is still two failures in browser_447951.js.

browser/components/sessionstore/test/browser_447951.js
FAIL ... and ignored - Got http://mochi.test:8888/browser/browser/components/sessionstore/test/browser_447951_sample.html#49, expected http://mochi.test:8888/browser/browser/components/sessionstore/test/browser_447951_sample.html#end

FAIL ... and the first item was removed - Got http://mochi.test:8888/browser/browser/components/sessionstore/test/browser_447951_sample.html#0, expected http://mochi.test:8888/browser/browser/components/sessionstore/test/browser_447951_sample.html#1

The test trying to use " visit another anchor" to append a new session history.
But the sessionHistoryListener in the parent doesn't be notified after "visit another anchor".

https://searchfox.org/mozilla-central/rev/23d4bffcad365e68d2d45776017056b76ca9a968/browser/components/sessionstore/test/browser_447951.js#45
// visit yet another anchor (appending it to session history)
ContentTask.spawn(tab.linkedBrowser, null, function() {
content.window.document.querySelector("a").click();
}).then(flushAndCheck);

In the end, I found it is a timing issue due to the async call from parent to child.
I will include the solution in bug 1507287.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.