Bug 1272830 - Part 1: Intermittent fetch-request-redirect.https.html - test modified. r=bkelly
authorTom Tung <ttung@mozilla.com>
Fri, 20 May 2016 11:09:54 +0800
changeset 337888 ce58234202e93b120b356a1a5436faa8b14ebcd9
parent 337887 ba0982c4e30cfbc79ef1f4e25c4a1afb0766cfec
child 337889 a8b3e46732c78b6f01e922602145e6959acf319b
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbkelly
bugs1272830
milestone49.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 1272830 - Part 1: Intermittent fetch-request-redirect.https.html - test modified. r=bkelly
testing/web-platform/tests/service-workers/service-worker/resources/fetch-rewrite-worker.js
--- a/testing/web-platform/tests/service-workers/service-worker/resources/fetch-rewrite-worker.js
+++ b/testing/web-platform/tests/service-workers/service-worker/resources/fetch-rewrite-worker.js
@@ -118,17 +118,18 @@ self.addEventListener('fetch', function(
                   detail: 'got '+ response.redirected +
                           ' Response.redirected instead of ' + expectedRedirected
                 })));
               }
             }
           }
 
           if (params['cache']) {
-            var cacheName = "cached-fetches-" + Date.now();
+            var cacheName = "cached-fetches-" + performance.now() + "-" +
+                            event.request.url;
             var cache;
             var cachedResponse;
             return self.caches.open(cacheName).then(function(opened) {
               cache = opened;
               return cache.put(request, response);
             }).then(function() {
               return cache.match(request);
             }).then(function(cached) {