Reftest should use onload on the browser element rather than the nsIWebProgressListener stuff it currently uses. This might fix the intermittent test failures I'm seeing with some of the tests from bug 1156. It should also be known to fire after onload in the content.
Created attachment 254598 [details] [diff] [review] patch I'm hoping this might fix the random failures on two of the object tests.
And this also adds a timeout so that we give up if a page doesn't load after 10 seconds. (It doesn't look like we fire onerror for frames, although I suppose I could actually test...)
No, we don't seem to fire error events.
Comment on attachment 254598 [details] [diff] [review] patch nice patch
Checked in to trunk.
I backed out the timeout part of the page, and there are also a few test regressions from the other part (and they aren't fixed by putting the 20ms delay back).
Created attachment 254884 [details] [diff] [review] combined regression fixes I've fixed the sources of the regressions. There were two problems: * some tests used setTimeout(foo, 0) from onload. My capturing load event came before onload, so I needed a double setTimeout to end up after the setTimeout in the test. * I was handling load events from subframes The latter was the cause of the fake load timeouts, so I've also restored the part of the patch that I backed out yesterday (comment 6). This patch represents the combination of all the changes I've made since I checked in the above patch. Since I reverted the backout, the net change is pretty small.
See bug 371026 for an idea about adding mochitest-like SimpleTest.waitForExplicitFinish() / SimpleTest.finish() functions instead.
9 years ago