Bug 1204596 - Part 3: Store the responses with manual redirect in the tests added for bug 1164397; r=bkelly
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 16 Sep 2015 11:59:01 -0400
changeset 265649 dbe78efd974c866feb6c616d476dcce0ace42a3a
parent 265648 175bea2276c7263a50dd62bb3b945cb8e9191a8d
child 265650 f49b6f48c99381753b01e0dc43a666774301af3d
push id15472
push usercbook@mozilla.com
push dateFri, 02 Oct 2015 11:51:34 +0000
treeherderfx-team@2c33ef6b27e0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbkelly
bugs1204596, 1164397
milestone44.0a1
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) {