Closed Bug 828558 Opened 7 years ago Closed 7 years ago

Marionette attaches to wrong window with -jsconsole

Categories

(Testing :: Marionette, defect)

defect
Not set

Tracking

(firefox19 wontfix, firefox20 wontfix, firefox21 fixed, b2g18 fixed)

RESOLVED FIXED
mozilla21
Tracking Status
firefox19 --- wontfix
firefox20 --- wontfix
firefox21 --- fixed
b2g18 --- fixed

People

(Reporter: jgriffin, Assigned: jgriffin)

Details

Attachments

(1 file)

If you launch a b2g desktop build with -jsconsole, Marionette will attach to the console window instead of the b2g window.  This is because we use 'getMostRecentWindow' here:  http://mxr.mozilla.org/mozilla-central/source/testing/marionette/marionette-actors.js#325

The same problem may exist for desktop Firefox but I haven't tested it.
Hm, but you are calling getMostRecentWindow with the window type. Given that the console window is not of the type navigator:browser it shouldn't happen.
We don't use a window type for B2G, since it didn't previously have one.  I think it uses navigator:browser now, so perhaps just removing the special case for B2G will fix this.
This works for me locally on a b2g desktop build.  I'll run it through try to check the device builds.
Comment on attachment 702622 [details] [diff] [review]
Don't attach to jsconsole window

Try run is green.
Attachment #702622 - Flags: review?(mdas)
Attachment #702622 - Flags: review?(mdas) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/4d2f27cdef91
Whiteboard: [automation-needed-in-b2g18]
Target Milestone: --- → mozilla21
Assignee: nobody → jgriffin
https://hg.mozilla.org/mozilla-central/rev/4d2f27cdef91
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.