зеркало из https://github.com/mozilla/gecko-dev.git
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
This commit is contained in:
Родитель
7d9aac87ab
Коммит
89549e5602
|
@ -604188,7 +604188,7 @@
|
|||
"support"
|
||||
],
|
||||
"service-workers/service-worker/resources/resource-timing-worker.js": [
|
||||
"2a47775874086c1cdff257e3243af1af0b5e84be",
|
||||
"04a965dc0324c035bb3331e546d9bb43230d5eac",
|
||||
"support"
|
||||
],
|
||||
"service-workers/service-worker/resources/respond-then-throw-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);
|
||||
}));
|
||||
}
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче