Bug 1204596 - Part 3: Store the responses with manual redirect in the tests added for bug 1164397; r=bkelly
☠☠ backed out by 004e30faaea8 ☠ ☠
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 16 Sep 2015 11:59:01 -0400
changeset 295543 2662a1ad4cad84a6209c8116ad714d6a0c1bb302
parent 295542 cfc4c4ecbbf520970834fe7cd6e2c017bcd86852
child 295544 eec5dceb90b18eb7714d1b5c65d6518c6ce8efc2
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.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 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) {