Closed Bug 1579093 Opened 5 years ago Closed 5 years ago

Fix failing test docshell/test/navigation/test_load_history_entry.html on ash

Categories

(Core :: DOM: Navigation, defect, P2)

Other Branch
defect

Tracking

()

RESOLVED FIXED
Fission Milestone M4

People

(Reporter: annyG, Assigned: annyG)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Fix failing test docshell/test/navigation/test_load_history_entry.html as seen here https://treeherder.mozilla.org/#/jobs?repo=ash&selectedJob=264938202

No longer depends on: 1546759

My initial speculation is that it is failing because of recent changes to session history in bug https://bugzilla.mozilla.org/show_bug.cgi?id=1563587. My test was assuming certain things about navigations that might no longer be valid.

Assignee: nobody → agakhokidze
Summary: Change nsSHistory::WalkHistoryEntries to walk browsing context tree instead of doc shell tree → Fix failing test docshell/test/navigation/test_load_history_entry.html on ash

Step 2 seems to leak hashchange event to step 3 occasionally. That is racy because of setTimeout(,0) usage in the test.

Thank you for taking a look! You mentioned doing something like this

await clickLink(testWin, "link2");
+ await new Promise((r) => setTimeout(r));
await doAfterEachTest(testWin, shistory, numSHEntries, previousLocation);

fixes the test. Is this considered a hack and I should change how the test is written or is this considered to be an acceptable? :D

Flags: needinfo?(bugs)

That is considered a hack. It was just for debugging.
Unless I haven't made some mistake, the previous step should just wait for hashchange event too.

Flags: needinfo?(bugs)
Attachment #9097703 - Attachment is obsolete: true
Status: NEW → RESOLVED
Fission Milestone: --- → M4
Closed: 5 years ago
Priority: P3 → P2
Resolution: --- → FIXED
Version: unspecified → Other Branch
Pushed by pvanderbeken@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/dfd20e536b85
Fix failing test docshell/test/navigation/test_load_history_entry.html on ash, r=smaug
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: