Skip to content

Commit

Permalink
Merge pull request #621 from gmetais/fix-cookies
Browse files Browse the repository at this point in the history
Quick fix for cookie regression in PhantomJS 2.1
  • Loading branch information
macbre committed Mar 26, 2016
2 parents 57ed4f3 + 22f46ae commit 4980320
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions extensions/cookies/cookies.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* global phantom: true */
'use strict';

exports.version = '1.0';
exports.version = '1.1';

exports.module = function(phantomas) {

Expand Down Expand Up @@ -74,7 +74,8 @@ exports.module = function(phantomas) {
}

if (!phantom.addCookie(cookie)) {
throw 'PhantomJS could not add cookie: ' + JSON.stringify(cookie);
// In PhantomJS 2.1, the addCookie function always returns false (#597).
//throw 'PhantomJS could not add cookie: ' + JSON.stringify(cookie);
}

phantomas.log('Cookies: set ' + JSON.stringify(cookie));
Expand Down
2 changes: 2 additions & 0 deletions test/integration-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

# DOM operations
- url: "/dom-operations.html"
options:
cookie: "bar=foo;domain=url"
metrics:
requests: 3
cssCount: 1
Expand Down

0 comments on commit 4980320

Please sign in to comment.