Bug 21576 - Fix a race in fast/history/history_reload.html
: Fix a race in fast/history/history_reload.html
Product: WebKit
Classification: Unclassified
Component: Tools / Tests
: 528+ (Nightly build)
: All All
: P2 Normal
Assigned To: Pam Greene (IRC:pamg)
Depends on:
  Show dependency treegraph
Reported: 2008-10-13 12:34 PDT by Pam Greene (IRC:pamg)
Modified: 2008-10-17 11:08 PDT (History)
0 users

See Also:

Fixed test (1.97 KB, patch)
2008-10-13 12:47 PDT, Pam Greene (IRC:pamg)
timothy: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pam Greene (IRC:pamg) 2008-10-13 12:34:49 PDT
The fast/history/history_reload.html test has a potential race condition caused by higher-resolution timers.  I don't know exactly what threshold it takes to expose the problem, but it's worth removing anyway.

Each time the subframe loads, the onclose handler calls layoutTestController.notifyDone via setTimeout(0). If that gets fired before the history.go() completes, the test appears to have failed.

One solution is to always use two passes in the test, and not complete until the second one.
Comment 1 Pam Greene (IRC:pamg) 2008-10-13 12:47:23 PDT
Created attachment 24322 [details]
Fixed test

No change to expected results.
Comment 2 Pam Greene (IRC:pamg) 2008-10-17 11:08:06 PDT
Landed in r37657.