Bug 1394399 P2 Fix mochitests to expect "same-origin" default Request.credentials. r=baku
authorBen Kelly <ben@wanderview.com>
Fri, 20 Apr 2018 08:45:13 -0700
changeset 468291 3c02e9df8b2d5e48cd42d647890b9c4c8fbedbd5
parent 468290 2d657d8dadf9b25118101919d7c3997816949692
child 468292 2feb276e4fcceb7badbc4b634129111656c60f62
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1394399
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1394399 P2 Fix mochitests to expect "same-origin" default Request.credentials. r=baku
dom/tests/mochitest/fetch/test_fetch_cors.js
dom/tests/mochitest/fetch/test_request.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,
--- 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.destination, "", "Default destination is the empty string.");
   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.destination, "", "Default destination is the empty string.");
   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",