Closed
Bug 431464
Opened 17 years ago
Closed 17 years ago
TestRunner should try to ensure focus
Categories
(Testing :: Mochitest, defect)
Testing
Mochitest
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: ajschult784, Assigned: ajschult784)
References
Details
Attachments
(1 file)
2.93 KB,
patch
|
sayrer
:
review+
|
Details | Diff | Splinter Review |
Running mochitests on SeaMonkey, I consistently hit failures and timeouts during toolkit/ tests. We're seeing the same failures now with buildbot on our new boxes. The underlying problem seems generally that
1) a test opens a window (which gets focus)
2) the test closes the window
3) the next test runs
4) the main window regains focus
That's sufficient to cause problems. With a testcase outside mochitest, I see this behavior in both Firefox and SeaMonkey, but running mochitests, it only seems to cause problems in SeaMonkey. It's possible the problem also occurs on Firefox and results in some of the random timeouts that happen on the FF boxen. Anyway, I don't understand that, but the only clear problem I see is that TestRunner should ensure the main window (and the iframe specifically) has focus before it tries to run the next test.
In testing different ways to ensure proper focus, I found that it was generally sufficient to wait (doing nothing) for focus to sort itself out, but I have hit instances where it helped to have TestRunner actually invoke focus(). I've also hit instances where the iframe was not completely visible (due to a test like the datepicker which synthesizes pgup/pgdn events) and this can also cause problems (the iframe doesn't receive onfocus if it's not visible enough), so I've added a window.scrollTo.
Attachment #318535 -
Flags: review?(sayrer)
Comment 1•17 years ago
|
||
Applying the patch from here made the SeaMonkey Linux unit test buildbot slave succeed in mochitests instead of failing a number of tests and finally timing out - the Windows slave dropped from 78 to 7 failures in mochitests (the remaining ones might be something completely different, I haven't investigated those yet).
Comment 2•17 years ago
|
||
Caring that the iframe is fully visible and has focus is probably really the key. The remaining SeaMonkey failure on Windows are from what I heard likely problems with the iframe not being fully visible, possibly due to a small default window size, and mouse event being synthesized over points where the iframe should be but isn't as some parts are hidden due to the scroll position.
Firefox has a larger default window and does more stuff lazily in the browser window than SeaMonkey, so it's less likely that something is scrolled out of view or that focus doesn't fix itself fast enough. Sometimes something like that does still happen, though, and this patch should fix that.
BTW, I think we tend to run into a "mochitest FAIL" on Linux because enough mochitests hang run into the mochitest-internal timeout that we get to the point where we hit the timeout that buildbot sets on the mochitest suite and kills it.
Updated•17 years ago
|
Attachment #318535 -
Flags: review?(sayrer) → review+
Comment 3•17 years ago
|
||
Does this patch require approval in order to land?
Comment 4•17 years ago
|
||
no
Updated•17 years ago
|
Keywords: checkin-needed
Comment 5•17 years ago
|
||
Please do not add checkin-needed to other people's bugs. Andrew has commit access, and he'll get to this. If he needs somebody else to commit this for him, he can add checkin-needed himself.
Keywords: checkin-needed
Assignee | ||
Comment 6•17 years ago
|
||
FIXED
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Comment 7•16 years ago
|
||
Moving a bunch of Core :: Testing bugs to Testing :: Mochitest to clear out the former, which is obsolete now that we have more specialized categories for such bugs; filter on the string "MochitestMmMm" to delete all these notifications.
Component: Testing → Mochitest
Product: Core → Testing
QA Contact: testing → mochitest
Version: Trunk → unspecified
You need to log in
before you can comment on or make changes to this bug.
Description
•