Bug 1372595 - Return cookie expiry timestamp; r=whimboo draft
authorAndreas Tolfsen <ato@sny.no>
Wed, 28 Jun 2017 14:16:50 -0700
changeset 602404 0df947287b5950e35b4aa4a5c22c0ef9648886aa
parent 602403 3045dffd2c5c1ec5837b75252a4b148a5cc6e2b0
child 602405 cdd936ecddb1ce15f8f8cbf128cdc005369574f9
push id66423
push userbmo:ato@sny.no
push dateThu, 29 Jun 2017 23:57:19 +0000
reviewerswhimboo
bugs1372595
milestone56.0a1
Bug 1372595 - Return cookie expiry timestamp; r=whimboo The expires property on nsICookie2 does not exist and we are consequently returning it as undefined, which gets omitted in the JSON serialisation to the client. This patch changes it to return the correct property so that the expiry property is returned as part of the serialised cookie. MozReview-Commit-ID: IIjf4NWnUoQ
testing/marionette/cookie.js
--- a/testing/marionette/cookie.js
+++ b/testing/marionette/cookie.js
@@ -171,15 +171,15 @@ cookie.iter = function* (host, currentPa
           isForCurrentPath(cookie.path)) {
         yield {
           "name": cookie.name,
           "value": cookie.value,
           "path": cookie.path,
           "domain": cookie.host,
           "secure": cookie.isSecure,
           "httpOnly": cookie.isHttpOnly,
-          "expiry": cookie.expires,
+          "expiry": cookie.expiry,
         };
       }
       hostname = hostname.replace(/^.*?\./, "");
     } while (hostname.indexOf(".") != -1);
   }
 };