Python client sends field "id" with value null to switchToFrame when switching to default browser context

RESOLVED FIXED in Firefox 40

Status

Testing
Marionette
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: ato, Assigned: ato)

Tracking

({ateam-marionette-client})

unspecified
mozilla40
ateam-marionette-client
Points:
---

Firefox Tracking Flags

(firefox40 fixed)

Details

MozReview Requests

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

3 years ago
The Python client sends a packet with the field "id" set to null when switching to the default browser context.  To make this switch, "id" should not be defined at all.

The reason this currently works is because we're using the == operator when comparing cmd.parameter.id.
(Assignee)

Updated

3 years ago
Assignee: nobody → ato
Status: NEW → ASSIGNED
Keywords: ateam-marionette-client
(Assignee)

Comment 1

3 years ago
Discovered this when working on bug 1157258.
(Assignee)

Comment 2

3 years ago
Created attachment 8597351 [details]
MozReview Request: bz://1158219/ato

/r/7623 - Bug 1158219: Don't set `id' field if undefined when switching frame

Pull down this commit:

hg pull -r cd490db0c8c18f68d4a91803daa833bc2f08631e https://reviewboard-hg.mozilla.org/gecko/
Attachment #8597351 - Flags: review?(jgriffin)
Attachment #8597351 - Flags: review?(jgriffin) → review+
https://hg.mozilla.org/mozilla-central/rev/7602f3f4944f
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox40: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
(Assignee)

Comment 7

3 years ago
Comment on attachment 8597351 [details]
MozReview Request: bz://1158219/ato
Attachment #8597351 - Attachment is obsolete: true
Attachment #8620155 - Flags: review+
(Assignee)

Comment 8

3 years ago
Created attachment 8620155 [details]
MozReview Request: Bug 1158219: Don't set `id' field if undefined when switching frame
I guess this comment and part of the check can be removed then too:
http://mxr.mozilla.org/mozilla-central/source/testing/marionette/driver.js#1645
1645     // Bug 1158219: Python client sends id when it shouldn't,
1646     // but we know that if it's null it wants us to switch to default
1647     if (cmd.parameters.id == null && !cmd.parameters.hasOwnProperty("element")) {
(Assignee)

Comment 10

3 years ago
(In reply to Martijn Wargers [:mwargers] (QA) from comment #9)
> I guess this comment and part of the check can be removed then too:
> http://mxr.mozilla.org/mozilla-central/source/testing/marionette/driver.
> js#1645
> 1645     // Bug 1158219: Python client sends id when it shouldn't,
> 1646     // but we know that if it's null it wants us to switch to default
> 1647     if (cmd.parameters.id == null &&
> !cmd.parameters.hasOwnProperty("element")) {

Filed bug 1202381 about this.
You need to log in before you can comment on or make changes to this bug.