Closed Bug 1095260 Opened 10 years ago Closed 10 years ago

Tests that switch windows are racy with e10s turned on

Categories

(Remote Protocol :: Marionette, defect)

defect
Not set
normal

Tracking

(e10s+)

RESOLVED FIXED
mozilla36
Tracking Status
e10s + ---

People

(Reporter: chmanchester, Assigned: chmanchester)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 4 obsolete files)

After working around bug 1095236, tests that switch windows (at least test_import_script_reuse_window.py and test_window_switching.py) can deadlock. It looks like switchToWindow loading marionette-listener.js happens later with e10s turned on and the next command hangs as a result. Adding a delay for instance at http://hg.mozilla.org/mozilla-central/file/678dd5860cce/testing/marionette/client/marionette/tests/unit/test_import_script_reuse_window.py#l22 makes this test pass. I guess we can wait for the script to finish loading before returning from switch_to_window or foist this responsibility on callers. David, do you have any advice on a way to proceed here?
Flags: needinfo?(dburns)
Waiting seems like the way here. Allowing the frame script's :register call to trigger sendOk instead of doing it in switchToFrame works fine, except for tests switching to a xul window, where loadFrameScript somehow doesn't get back to the parent. I guess I'll look into that next.
Assignee: nobody → cmanchester
This is slightly gross, but with it the window switching tests (except for those asserting crazy things about being in the main process) all pass with e10s turned on. The issue with the test.xul window was that the ChromeMessageSender for this window didn't have any child message managers to broadcast to, so we never got the register call we expected. Explicitly checking for how many child message managers we have and waiting for them works ok locally. https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=3fe69fcfe238
This isn't really need info, I'll ask for review if try comes back ok.
Flags: needinfo?(dburns)
Attachment #8519262 - Attachment is obsolete: true
Attachment #8519300 - Attachment is obsolete: true
/r/371 - Bug 1095260 - Make the response from a switch_to_frame call correspond to the completion of loading the marionette listener script. Pull down this commit: hg pull review -r db59f11f4a4501892a958bc7b713ef12cac22555
/r/371 - Bug 1095260 - Make the response from a switch_to_frame call correspond to the completion of loading the marionette listener script. Pull down this commit: hg pull review -r db59f11f4a4501892a958bc7b713ef12cac22555
Selection carets tests pass now when I run them locally. If we can agree not to block on bug 1095236 (using "dialog=1" appears incidental to those tests), then this bug is the last source of failures in the current set of marionette tests with e10s turned on.
Attachment #8520033 - Attachment is obsolete: true
Attachment #8520086 - Flags: review?(ato)
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Attachment #8520086 - Attachment is obsolete: true
Attachment #8618568 - Flags: review+
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: