Closed Bug 1118313 Opened 9 years ago Closed 9 years ago

newSession looks for non-conforming session_id property on Command

Categories

(Remote Protocol :: Marionette, defect)

defect
Not set
normal

Tracking

(firefox39 fixed)

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: ato, Assigned: gioyik, Mentored)

References

(Blocks 1 open bug)

Details

(Keywords: pi-marionette-server, Whiteboard: [good first bug][language=js])

Attachments

(1 file, 3 obsolete files)

The server looks for the property "session_id" on the Command object in newSession.  According to the WebDriver protocol it should be "sessionId".
Blocks: 1118298
Mentor: dburns
Whiteboard: [good first bug][language=js]
Hi, I like to work on this bug. Could you tell me the file where I need to make the change?
Flags: needinfo?(ato)
Redirecting question to bug mentor.
Flags: needinfo?(ato) → needinfo?(dburns)
We need to update https://dxr.mozilla.org/mozilla-central/source/testing/marionette/marionette-server.js#606 to check both session_id or sessionId to maintain backwards compatibility
Flags: needinfo?(dburns)
Attached patch 1118313.patch (obsolete) — Splinter Review
Attachment #8568769 - Flags: review?(dburns)
David, could you check it and tell me if it's ok?

Thanks
Comment on attachment 8568769 [details] [diff] [review]
1118313.patch

Review of attachment 8568769 [details] [diff] [review]:
-----------------------------------------------------------------

::: testing/marionette/marionette-server.js
@@ +602,5 @@
>      }
>  
>      this.scriptTimeout = 10000;
>      if (aRequest && aRequest.parameters) {
> +      this.sessionId = aRequest.parameters.session_id || aRequest.parameters.session_id || null;

one of these should be sessionId
Attachment #8568769 - Flags: review?(dburns) → review-
Attached patch 1118313.patch (obsolete) — Splinter Review
Patch v2
Attachment #8570972 - Flags: review?(dburns)
Sorry was my fault
Comment on attachment 8570972 [details] [diff] [review]
1118313.patch

Review of attachment 8570972 [details] [diff] [review]:
-----------------------------------------------------------------

sorry this took so long to review, I have an attention span of a goldfish and kept starting and not finishing the review :/

::: testing/marionette/marionette-server.js
@@ +602,5 @@
>      }
>  
>      this.scriptTimeout = 10000;
>      if (aRequest && aRequest.parameters) {
> +      this.sessionId = aRequest.parameters.session_id || aRequest.parameters.sessionId || null;

I would prefer this since if it doesnt hit either of them it will be undefined and the null check below would still work

this.sessionId = aRequest.parameters.sessionId ? aRequest.parameters.sessionId : aRequest.parameters.session_id ;
Attachment #8570972 - Flags: review?(dburns) → review-
Attached patch 1118313.patch (obsolete) — Splinter Review
Patch v3
Attachment #8568769 - Attachment is obsolete: true
Attachment #8570972 - Attachment is obsolete: true
Attachment #8574498 - Flags: review?(dburns)
Please let me know if this is what you suggest my or I misunderstand your feedback.

Thanks
Assignee: nobody → gioyik
Attachment #8574498 - Flags: review?(dburns) → review+
Perfect! THanks! Please have a look at https://wiki.mozilla.org/Auto-tools/Projects/Marionette/Auto-tools/Projects/Marionette/Roadmap#Good_First_Bugs if there are any other good first bugs you would like to tackle!
Keywords: checkin-needed
This needs rebasing, sorry.
Keywords: checkin-needed
Attached patch PatchSplinter Review
Sorry I forget this issue. I attach a rebased version of the patch.
Keywords: checkin-needed
Attachment #8574498 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/66e7de1f1e8e
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
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: