# HG changeset patch # User Ben Kelly # Date 1524239113 25200 # Node ID 3c02e9df8b2d5e48cd42d647890b9c4c8fbedbd5 # Parent 70ced186ff64159d0a4dfbc3264c409b3b472d2b Bug 1394399 P2 Fix mochitests to expect "same-origin" default Request.credentials. r=baku diff --git a/dom/tests/mochitest/fetch/test_fetch_cors.js b/dom/tests/mochitest/fetch/test_fetch_cors.js --- a/dom/tests/mochitest/fetch/test_fetch_cors.js +++ b/dom/tests/mochitest/fetch/test_fetch_cors.js @@ -59,19 +59,19 @@ function testSameOriginCredentials() { var tests = [ { // Initialize by setting a cookie. pass: 1, setCookie: cookieStr, withCred: "same-origin", }, { - // Default mode is "omit". + // Default mode is "same-origin". pass: 1, - noCookie: 1, + cookie: cookieStr, }, { pass: 1, noCookie: 1, withCred: "omit", }, { pass: 1, diff --git a/dom/tests/mochitest/fetch/test_request.js b/dom/tests/mochitest/fetch/test_request.js --- a/dom/tests/mochitest/fetch/test_request.js +++ b/dom/tests/mochitest/fetch/test_request.js @@ -1,27 +1,27 @@ function testDefaultCtor() { var req = new Request(""); is(req.method, "GET", "Default Request method is GET"); ok(req.headers instanceof Headers, "Request should have non-null Headers object"); is(req.url, self.location.href, "URL should be resolved with entry settings object's API base URL"); is(req.context, "fetch", "Default context is fetch."); is(req.referrer, "about:client", "Default referrer is `client` which serializes to about:client."); is(req.mode, "cors", "Request mode for string input is cors"); - is(req.credentials, "omit", "Default Request credentials is omit"); + is(req.credentials, "same-origin", "Default Request credentials is same-origin"); is(req.cache, "default", "Default Request cache is default"); var req = new Request(req); is(req.method, "GET", "Default Request method is GET"); ok(req.headers instanceof Headers, "Request should have non-null Headers object"); is(req.url, self.location.href, "URL should be resolved with entry settings object's API base URL"); is(req.context, "fetch", "Default context is fetch."); is(req.referrer, "about:client", "Default referrer is `client` which serializes to about:client."); is(req.mode, "cors", "Request mode string input is cors"); - is(req.credentials, "omit", "Default Request credentials is omit"); + is(req.credentials, "same-origin", "Default Request credentials is same-origin"); is(req.cache, "default", "Default Request cache is default"); } function testClone() { var orig = new Request("./cloned_request.txt", { method: 'POST', headers: { "Sample-Header": "5" }, body: "Sample body",