Fix failing test docshell/test/navigation/test_load_history_entry.html on ash
Categories
(Core :: DOM: Navigation, defect, P2)
Tracking
()
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
Assignee | ||
Comment 1•5 years ago
|
||
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 | ||
Updated•5 years ago
|
Comment 2•5 years ago
|
||
Step 2 seems to leak hashchange event to step 3 occasionally. That is racy because of setTimeout(,0) usage in the test.
Assignee | ||
Comment 3•5 years ago
|
||
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
Comment 4•5 years ago
|
||
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.
Assignee | ||
Comment 5•5 years ago
|
||
Updated•5 years ago
|
Assignee | ||
Comment 6•5 years ago
|
||
Comment 7•5 years ago
|
||
Landed in ash branch - https://hg.mozilla.org/projects/ash/rev/2353562bc8aa7330ee6dfae16c25b9023d8598f6
![]() |
||
Comment 9•5 years ago
|
||
bugherder |
Description
•