Closed Bug 1223907 Opened 9 years ago Closed 9 years ago

Add Cookie body not encapsulated in cookie field

Categories

(Remote Protocol :: Marionette, defect)

44 Branch
defect
Not set
normal

Tracking

(firefox45 fixed)

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: titus.fortner, Assigned: ato)

References

(Blocks 1 open bug)

Details

(Keywords: pi-marionette-server)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2561.0 Safari/537.36

Steps to reproduce:

This works:    >>> http://localhost:4446/session/0c18d086-e1a8-c34f-bcf6-637c769f8003/cookie | {"name":"foo","value":"bar","path":"/","secure":false}

but is not correct according to the spec: http://www.w3.org/TR/webdriver/#get-cookie

This is correct and does not work:
   >>> http://localhost:4446/session/62e70c59-6d97-004f-863c-29c258611d77/cookie | {"cookie":{"name":"foo","value":"bar","path":"/","secure":false}}



Actual results:

{"error":"invalid argument","message":"Missing 'name' parameter"}


Expected results:

success response and gets added
Blocks: webdriver
Component: General → Marionette
Summary: Incorrect implementation of adding cookie → Add Cookie body not encapsulated in cookie field
Assignee: nobody → ato
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
According to the specification, the body sent to Add Cookie should be encapsulated in a "cookie" field: https://w3c.github.io/webdriver/webdriver-spec.html#add-cookie

The expected input is: {"cookie": <cookie>}
Bug 1223907: Refactor cookies in Marionette

Moves most of the cookie implementation to a new file,
testing/marionette/cookies.js.  The new Cookies class encapsulates all
APIs for manipulating and querying cookies from content space.

It communicates with chrome space, where the cookie manager lives, through
a new SyncContentSender provided by testing/marionette/proxy.js.  This new
interface provides synchronous and transparent communication from content
to chrome, not dissimilar from how the original listener proxy works.

r=dburns
Attachment #8687168 - Flags: review?(dburns)
Comment on attachment 8687168 [details]
MozReview Request: Bug 1223907: Refactor cookies in Marionette

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/25125/diff/1-2/
Comment on attachment 8687168 [details]
MozReview Request: Bug 1223907: Refactor cookies in Marionette

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/25125/diff/1-2/
Comment on attachment 8687168 [details]
MozReview Request: Bug 1223907: Refactor cookies in Marionette

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/25125/diff/2-3/
Comment on attachment 8687168 [details]
MozReview Request: Bug 1223907: Refactor cookies in Marionette

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/25125/diff/3-4/
Comment on attachment 8687168 [details]
MozReview Request: Bug 1223907: Refactor cookies in Marionette

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/25125/diff/4-5/
Comment on attachment 8687168 [details]
MozReview Request: Bug 1223907: Refactor cookies in Marionette

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/25125/diff/5-6/
Comment on attachment 8687168 [details]
MozReview Request: Bug 1223907: Refactor cookies in Marionette

https://reviewboard.mozilla.org/r/25125/#review22649
Attachment #8687168 - Flags: review?(dburns) → review+
Comment on attachment 8687168 [details]
MozReview Request: Bug 1223907: Refactor cookies in Marionette

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/25125/diff/6-7/
Comment on attachment 8687168 [details]
MozReview Request: Bug 1223907: Refactor cookies in Marionette

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/25125/diff/7-8/
Comment on attachment 8687168 [details]
MozReview Request: Bug 1223907: Refactor cookies in Marionette

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/25125/diff/8-9/
Comment on attachment 8687168 [details]
MozReview Request: Bug 1223907: Refactor cookies in Marionette

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/25125/diff/9-10/
https://hg.mozilla.org/mozilla-central/rev/ca54275a013d
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
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: