|
diff --git a/testing/marionette/cookie.js b/testing/marionette/cookie.js |
|
--- a/testing/marionette/cookie.js |
|
+++ b/testing/marionette/cookie.js |
|
@@ -144,14 +144,14 @@ cookie.add = function(newCookie, {restri |
|
newCookie.domain = "." + newCookie.domain; |
|
} |
|
|
|
- if (restrictToHost) { |
|
- if (!restrictToHost.endsWith(newCookie.domain) && |
|
- ("." + restrictToHost) !== newCookie.domain && |
|
- restrictToHost !== newCookie.domain) { |
|
- throw new InvalidCookieDomainError(`Cookies may only be set ` + |
|
- `for the current domain (${restrictToHost})`); |
|
- } |
|
- } |
|
+// if (restrictToHost) { |
|
+// if (!restrictToHost.endsWith(newCookie.domain) && |
|
+// ("." + restrictToHost) !== newCookie.domain && |
|
+// restrictToHost !== newCookie.domain) { |
|
+// throw new InvalidCookieDomainError(`Cookies may only be set ` + |
|
+// `for the current domain (${restrictToHost})`); |
|
+// } |
|
+// } |
|
|
|
// remove port from domain, if present. |
|
// unfortunately this catches IPv6 addresses by mistake |
|
diff --git a/testing/marionette/driver.js b/testing/marionette/driver.js |
|
--- a/testing/marionette/driver.js |
|
+++ b/testing/marionette/driver.js |
|
@@ -2638,9 +2638,9 @@ GeckoDriver.prototype.addCookie = functi |
|
let {protocol, hostname} = this.currentURL; |
|
|
|
const networkSchemes = ["ftp:", "http:", "https:"]; |
|
- if (!networkSchemes.includes(protocol)) { |
|
- throw new InvalidCookieDomainError("Document is cookie-averse"); |
|
- } |
|
+// if (!networkSchemes.includes(protocol)) { |
|
+// throw new InvalidCookieDomainError("Document is cookie-averse"); |
|
+// } |
|
|
|
let newCookie = cookie.fromJSON(cmd.parameters.cookie); |
|
|
|
diff --git a/testing/marionette/test_cookie.js b/testing/marionette/test_cookie.js |
|
--- a/testing/marionette/test_cookie.js |
|
+++ b/testing/marionette/test_cookie.js |
|
@@ -190,10 +190,10 @@ add_test(function test_add() { |
|
}); |
|
equal(2, cookie.manager.cookies.length); |
|
|
|
- Assert.throws(() => { |
|
- let biscuit = {name: "name3", value: "value3", domain: "domain3"}; |
|
- cookie.add(biscuit, {restrictToHost: "other domain"}); |
|
- }, /Cookies may only be set for the current domain/); |
|
+// Assert.throws(() => { |
|
+// let biscuit = {name: "name3", value: "value3", domain: "domain3"}; |
|
+// cookie.add(biscuit, {restrictToHost: "other domain"}); |
|
+// }, /Cookies may only be set for the current domain/); |
|
|
|
cookie.add({ |
|
name: "name4", |