Bug 1204596 - Part 3: Store the responses with manual redirect in the tests added for bug 1164397; r=bkelly
☠☠ backed out by 83e1183fff66 ☠ ☠
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 16 Sep 2015 11:59:01 -0400
changeset 296280 35b2edcb498b63f52124aeb792da395adb188314
parent 296279 daa0e457650e98f7fd9060eab3df0430f26820e1
child 296281 0ee0ccd92605d502e04921fc671ade08f7d6440e
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbkelly
bugs1204596, 1164397
milestone43.0a2
Bug 1204596 - Part 3: Store the responses with manual redirect in the tests added for bug 1164397; r=bkelly This needs to be done so that we match the manual redirect mode for navigations when the response is stored in the cache.
dom/workers/test/serviceworkers/fetch/origin/https/origin_test.js
dom/workers/test/serviceworkers/fetch/origin/origin_test.js
--- a/dom/workers/test/serviceworkers/fetch/origin/https/origin_test.js
+++ b/dom/workers/test/serviceworkers/fetch/origin/https/origin_test.js
@@ -1,15 +1,15 @@
 var prefix = "/tests/dom/workers/test/serviceworkers/fetch/origin/https/";
 
 self.addEventListener("install", function(event) {
   event.waitUntil(
     self.caches.open("origin-cache")
       .then(c => {
-        return c.add(prefix + 'index-https.sjs');
+        return c.add(new Request(prefix + 'index-https.sjs', {redirect: "manual"}));
       })
   );
 });
 
 self.addEventListener("fetch", function(event) {
   if (event.request.url.indexOf("index-cached-https.sjs") >= 0) {
     event.respondWith(
       self.caches.open("origin-cache")
--- a/dom/workers/test/serviceworkers/fetch/origin/origin_test.js
+++ b/dom/workers/test/serviceworkers/fetch/origin/origin_test.js
@@ -1,18 +1,18 @@
 var prefix = "/tests/dom/workers/test/serviceworkers/fetch/origin/";
 
 self.addEventListener("install", function(event) {
   event.waitUntil(
     self.caches.open("origin-cache")
       .then(c => {
         return Promise.all(
           [
-            c.add(prefix + 'index.sjs'),
-            c.add(prefix + 'index-to-https.sjs')
+            c.add(new Request(prefix + 'index.sjs', {redirect: "manual"})),
+            c.add(new Request(prefix + 'index-to-https.sjs', {redirect: "manual"}))
           ]
         );
       })
   );
 });
 
 self.addEventListener("fetch", function(event) {
   if (event.request.url.indexOf("index-cached.sjs") >= 0) {