diff --git a/testing/web-platform/meta/MANIFEST.json b/testing/web-platform/meta/MANIFEST.json index 8815ba18535a..0fff97886266 100644 --- a/testing/web-platform/meta/MANIFEST.json +++ b/testing/web-platform/meta/MANIFEST.json @@ -292784,11 +292784,6 @@ {} ] ], - "service-workers/cache-storage/script-tests/cache-abort.js": [ - [ - {} - ] - ], "service-workers/cache-storage/script-tests/cache-add.js": [ [ {} @@ -361984,12 +361979,6 @@ } ] ], - "service-workers/cache-storage/serviceworker/cache-abort.https.html": [ - [ - "/service-workers/cache-storage/serviceworker/cache-abort.https.html", - {} - ] - ], "service-workers/cache-storage/serviceworker/cache-add.https.html": [ [ "/service-workers/cache-storage/serviceworker/cache-add.https.html", @@ -362068,12 +362057,6 @@ {} ] ], - "service-workers/cache-storage/window/cache-abort.https.html": [ - [ - "/service-workers/cache-storage/window/cache-abort.https.html", - {} - ] - ], "service-workers/cache-storage/window/cache-add.https.html": [ [ "/service-workers/cache-storage/window/cache-add.https.html", @@ -362154,12 +362137,6 @@ } ] ], - "service-workers/cache-storage/worker/cache-abort.https.html": [ - [ - "/service-workers/cache-storage/worker/cache-abort.https.html", - {} - ] - ], "service-workers/cache-storage/worker/cache-add.https.html": [ [ "/service-workers/cache-storage/worker/cache-add.https.html", @@ -595511,10 +595488,6 @@ "fc315489c4d337f7cf8395beb4005be9c12da9d6", "support" ], - "service-workers/cache-storage/script-tests/cache-abort.js": [ - "7c381e34a8e1444ad82645caf05ec8cbfe8360f8", - "support" - ], "service-workers/cache-storage/script-tests/cache-add.js": [ "5807ce231254f89d9e5f2fc43955a8dda5bd865d", "support" @@ -595551,10 +595524,6 @@ "43a44ad35e90ce759de7a855f75b149b756029b4", "support" ], - "service-workers/cache-storage/serviceworker/cache-abort.https.html": [ - "6b44436f3b2e1a463e64f3f5fc343086a295a975", - "testharness" - ], "service-workers/cache-storage/serviceworker/cache-add.https.html": [ "294e76cb7b067b17fc9a0850bdab1d6e169cc25a", "testharness" @@ -595595,10 +595564,6 @@ "ef598649e75e3c8736729d7e233982748e31eb79", "testharness" ], - "service-workers/cache-storage/window/cache-abort.https.html": [ - "2143ee1d78242bd2d055f6ea1b63a1becff657fe", - "testharness" - ], "service-workers/cache-storage/window/cache-add.https.html": [ "d2c83935c4f413fa6f9459843a9ba669deb0e8ce", "testharness" @@ -595639,10 +595604,6 @@ "dafb0d18e02c256a78188fdaf6997a1abd58b215", "testharness" ], - "service-workers/cache-storage/worker/cache-abort.https.html": [ - "d67a78e50008a587d0b349daaacafc25a18cfd5b", - "testharness" - ], "service-workers/cache-storage/worker/cache-add.https.html": [ "2cbea6be14f2f1852993be40744cac72a7fc62f6", "testharness" diff --git a/testing/web-platform/tests/service-workers/cache-storage/script-tests/cache-abort.js b/testing/web-platform/tests/service-workers/cache-storage/script-tests/cache-abort.js deleted file mode 100644 index ec4130fded29..000000000000 --- a/testing/web-platform/tests/service-workers/cache-storage/script-tests/cache-abort.js +++ /dev/null @@ -1,81 +0,0 @@ -if (self.importScripts) { - importScripts('/resources/testharness.js'); - importScripts('../resources/test-helpers.js'); - importScripts('/common/utils.js'); -} - -// We perform the same tests on put, add, addAll. Parameterise the tests to -// reduce repetition. -const methodsToTest = { - put: async (cache, request) => { - const response = await fetch(request); - return cache.put(request, response); - }, - add: async (cache, request) => cache.add(request), - addAll: async (cache, request) => cache.addAll([request]), -}; - -for (const method in methodsToTest) { - const perform = methodsToTest[method]; - - cache_test(async (cache, test) => { - const controller = new AbortController(); - const signal = controller.signal; - controller.abort(); - const request = new Request('../resources/simple.txt', { signal }); - return promise_rejects(test, 'AbortError', perform(cache, request), - `${method} should reject`); - }, `${method}() on an already-aborted request should reject with AbortError`); - - cache_test(async (cache, test) => { - const controller = new AbortController(); - const signal = controller.signal; - const request = new Request('../resources/simple.txt', { signal }); - const promise = perform(cache, request); - controller.abort(); - return promise_rejects(test, 'AbortError', promise, - `${method} should reject`); - }, `${method}() synchronously followed by abort should reject with ` + - `AbortError`); - - cache_test(async (cache, test) => { - const controller = new AbortController(); - const signal = controller.signal; - const stateKey = token(); - const abortKey = token(); - const request = new Request( - `../../../fetch/api/resources/infinite-slow-response.py?stateKey=${stateKey}&abortKey=${abortKey}`, - { signal }); - - const promise = perform(cache, request); - - // Wait for the server to start sending the response body. - let opened = false; - do { - // Normally only one fetch to 'stash-take' is needed, but the fetches - // will be served in reverse order sometimes - // (i.e., 'stash-take' gets served before 'infinite-slow-response'). - - const response = - await fetch(`../../../fetch/api/resources/stash-take.py?key=${stateKey}`); - const body = await response.json(); - if (body === 'open') opened = true; - } while (!opened); - - // Sadly the above loop cannot guarantee that the browser has started - // processing the response body. This delay is needed to make the test - // failures non-flaky in Chrome version 66. My deepest apologies. - await new Promise(resolve => setTimeout(resolve, 250)); - - controller.abort(); - - await promise_rejects(test, 'AbortError', promise, - `${method} should reject`); - - // infinite-slow-response.py doesn't know when to stop. - return fetch(`../../../fetch/api/resources/stash-put.py?key=${abortKey}`); - }, `${method}() followed by abort after headers received should reject ` + - `with AbortError`); -} - -done(); diff --git a/testing/web-platform/tests/service-workers/cache-storage/serviceworker/cache-abort.https.html b/testing/web-platform/tests/service-workers/cache-storage/serviceworker/cache-abort.https.html deleted file mode 100644 index b4f203b3333b..000000000000 --- a/testing/web-platform/tests/service-workers/cache-storage/serviceworker/cache-abort.https.html +++ /dev/null @@ -1,9 +0,0 @@ - -Cache Storage: Abort - - - - - diff --git a/testing/web-platform/tests/service-workers/cache-storage/window/cache-abort.https.html b/testing/web-platform/tests/service-workers/cache-storage/window/cache-abort.https.html deleted file mode 100644 index 935023dbe6e0..000000000000 --- a/testing/web-platform/tests/service-workers/cache-storage/window/cache-abort.https.html +++ /dev/null @@ -1,8 +0,0 @@ - -Cache Storage: Abort - - - - - - diff --git a/testing/web-platform/tests/service-workers/cache-storage/worker/cache-abort.https.html b/testing/web-platform/tests/service-workers/cache-storage/worker/cache-abort.https.html deleted file mode 100644 index ccd71910dc5e..000000000000 --- a/testing/web-platform/tests/service-workers/cache-storage/worker/cache-abort.https.html +++ /dev/null @@ -1,8 +0,0 @@ - ->Cache Storage: Abort - - - -