Closed Bug 947755 Opened 6 years ago Closed 4 years ago

Intermittent test_sessionhistory.html | Should have gone back to the static page! - got [object HTMLHeadingElement], expected null

Categories

(Core Graveyard :: History: Global, defect)

defect
Not set

Tracking

(firefox45 wontfix, firefox46 fixed, firefox47 fixed, firefox-esr45 fixed)

RESOLVED FIXED
mozilla47
Tracking Status
firefox45 --- wontfix
firefox46 --- fixed
firefox47 --- fixed
firefox-esr45 --- fixed

People

(Reporter: philor, Assigned: smaug)

Details

(Keywords: intermittent-failure, Whiteboard: [rr-chaos])

Attachments

(1 file)

https://tbpl.mozilla.org/php/getParsedLog.php?id=31653619&tree=Mozilla-Central
Ubuntu VM 12.04 mozilla-central debug test mochitest-2 on 2013-12-08 14:23:25 PST for push 6f6294b469f0
slave: tst-linux32-spot-018

(mid-GC)
14:29:37     INFO -  273 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/navigation/test_sessionhistory.html | Should have gone back to the static page! - got [object HTMLHeadingElement], expected null
OS: Linux → All
Hardware: x86 → All
Component: Session Restore → History: Global
Product: Firefox → Core
So the test that fails is http://mxr.mozilla.org/mozilla-central/source/docshell/test/navigation/file_document_write_1.html?force=1#4

It does

document.open();
document.write("<h5 id='dynamic'>document.written content</h5>");
document.close();
window.history.go(-1);
opener.setTimeout("isTestDynamic()", 2500);

the isTestDynamic checks to see if there document.getElementById("dynamic") returns null, and fails if it returns non-null.

The window.history.go(-1) kicks off a bunch of Necko machinery which races with the setTimeout.  In my recording of this failure rr starves the Necko threads ensuring the timeout happens first.  So is the bug that the test is inherently racy?  Or that the history.go(-1) needs to go through Necko at all?
yes.
My bad. Taking.
Assignee: nobody → bugs
Attached patch patchSplinter Review
Rely on events, not timeouts.
Attachment #8718983 - Flags: review?(khuey)
Comment on attachment 8718983 [details] [diff] [review]
patch

Review of attachment 8718983 [details] [diff] [review]:
-----------------------------------------------------------------

Can we remove the requestFlakeyTimeout at http://mxr.mozilla.org/mozilla-central/source/docshell/test/navigation/test_sessionhistory.html?force=1#38 now?

either way, r=me
Attachment #8718983 - Flags: review?(khuey) → review+
we can't. it is still used in other subsets.
https://hg.mozilla.org/mozilla-central/rev/c7abade6f812
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.