Bug 1460033 [wpt PR 10905] - Fix resource-timing.https.html test, a=testonly
authorNicolas Pena <npm@chromium.org>
Tue, 15 May 2018 13:39:42 +0000
changeset 418589 de3658798cd7aa4e6796b9b93f51851a804c966d
parent 418588 f34462ac250eea30820e4c7def5becb9b2755c29
child 418590 32af852fa30200dc9d005076292a9cb29080eb48
push id34007
push usercsabou@mozilla.com
push dateThu, 17 May 2018 09:47:02 +0000
treeherdermozilla-central@8fb36531f7d0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1460033, 10905, 1050383, 556964
milestone62.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 1460033 [wpt PR 10905] - Fix resource-timing.https.html test, a=testonly Automatic update from web-platform-testsFix resource-timing.https.html test This CL changes resource-timing-worker.js to use a generated response. This means Chrome no longer passes the test. Change-Id: Ib983e4fba9e81ddbee7f9572b6a06b3c1825577a Reviewed-on: https://chromium-review.googlesource.com/1050383 Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Reviewed-by: Timothy Dresser <tdresser@chromium.org> Cr-Commit-Position: refs/heads/master@{#556964} -- wpt-commits: d73901a036e17890987c1593fcaf090d03c3fb66 wpt-pr: 10905
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/service-workers/service-worker/resources/resource-timing-worker.js
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -604183,17 +604183,17 @@
    "c939271e717288203a5a298b95a7328100bd7c80",
    "support"
   ],
   "service-workers/service-worker/resources/resource-timing-iframe.sub.html": [
    "75bd224a9680af0557c53fb6e77645e4e0b8173d",
    "support"
   ],
   "service-workers/service-worker/resources/resource-timing-worker.js": [
-   "2a47775874086c1cdff257e3243af1af0b5e84be",
+   "04a965dc0324c035bb3331e546d9bb43230d5eac",
    "support"
   ],
   "service-workers/service-worker/resources/respond-then-throw-worker.js": [
    "d57215bcad8a3966175930642dfd34281b11aeff",
    "support"
   ],
   "service-workers/service-worker/resources/respond-with-body-accessed-response-iframe.html": [
    "d3d543503ab9c4398a674105a7c67f1a2e74cde7",
--- a/testing/web-platform/tests/service-workers/service-worker/resources/resource-timing-worker.js
+++ b/testing/web-platform/tests/service-workers/service-worker/resources/resource-timing-worker.js
@@ -1,5 +1,9 @@
 self.addEventListener('fetch', function(event) {
-    if (event.request.url.indexOf('dummy.js') != -1) {
-      event.respondWith(fetch('empty.js'));
-    }
-  });
+  if (event.request.url.indexOf('dummy.js') != -1) {
+    event.respondWith(new Promise(resolve => {
+      // Slightly delay the response so we ensure we get a non-zero
+      // duration.
+      setTimeout(_ => resolve(new Response('// Empty javascript')), 50);
+    }));
+  }
+});