From 5beb16d671468b4f11c4ed518b3d802183bd2af5 Mon Sep 17 00:00:00 2001 From: Tim van der Lippe Date: Sat, 13 Sep 2025 11:14:13 +0200 Subject: [PATCH] Enable abort controller preference for fetch/api/abort (#39282) This sets a baseline of tests for fetch-related implementation of AbortController. Part of #34866 Signed-off-by: Tim van der Lippe --- tests/wpt/meta/fetch/api/abort/__dir__.ini | 3 + .../api/abort/destroyed-context.html.ini | 2 - .../meta/fetch/api/abort/general.any.js.ini | 144 +++--------------- .../meta/fetch/api/abort/keepalive.html.ini | 2 +- .../meta/fetch/api/abort/request.any.js.ini | 72 --------- 5 files changed, 26 insertions(+), 197 deletions(-) create mode 100644 tests/wpt/meta/fetch/api/abort/__dir__.ini delete mode 100644 tests/wpt/meta/fetch/api/abort/destroyed-context.html.ini diff --git a/tests/wpt/meta/fetch/api/abort/__dir__.ini b/tests/wpt/meta/fetch/api/abort/__dir__.ini new file mode 100644 index 00000000000..e79af6880d5 --- /dev/null +++ b/tests/wpt/meta/fetch/api/abort/__dir__.ini @@ -0,0 +1,3 @@ +prefs: [ + "dom_abort_controller_enabled:true", +] diff --git a/tests/wpt/meta/fetch/api/abort/destroyed-context.html.ini b/tests/wpt/meta/fetch/api/abort/destroyed-context.html.ini deleted file mode 100644 index 94ac9e3e33e..00000000000 --- a/tests/wpt/meta/fetch/api/abort/destroyed-context.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[destroyed-context.html] - expected: ERROR diff --git a/tests/wpt/meta/fetch/api/abort/general.any.js.ini b/tests/wpt/meta/fetch/api/abort/general.any.js.ini index e02f18519aa..6dd0d143134 100644 --- a/tests/wpt/meta/fetch/api/abort/general.any.js.ini +++ b/tests/wpt/meta/fetch/api/abort/general.any.js.ini @@ -5,6 +5,7 @@ expected: ERROR [general.any.html] + expected: TIMEOUT [Aborting rejects with AbortError] expected: FAIL @@ -69,31 +70,31 @@ expected: FAIL [Fetch aborted & connection closed when aborted after calling response.arrayBuffer()] - expected: FAIL + expected: TIMEOUT [Fetch aborted & connection closed when aborted after calling response.blob()] - expected: FAIL + expected: NOTRUN [Fetch aborted & connection closed when aborted after calling response.formData()] - expected: FAIL + expected: NOTRUN [Fetch aborted & connection closed when aborted after calling response.json()] - expected: FAIL + expected: NOTRUN [Fetch aborted & connection closed when aborted after calling response.text()] - expected: FAIL + expected: NOTRUN [Stream errors once aborted. Underlying connection closed.] - expected: FAIL + expected: NOTRUN [Stream errors once aborted, after reading. Underlying connection closed.] - expected: FAIL + expected: NOTRUN [Stream will not error if body is empty. It's closed with an empty queue before it errors.] - expected: FAIL + expected: NOTRUN [Readable stream synchronously cancels with AbortError if aborted before reading] - expected: FAIL + expected: NOTRUN [Signal state is cloned] expected: FAIL @@ -111,61 +112,11 @@ expected: FAIL [Fetch aborted & connection closed when aborted after calling response.bytes()] - expected: FAIL - - [TypeError from request constructor takes priority - RequestInit's window is not null] - expected: FAIL - - [TypeError from request constructor takes priority - Input URL is not valid] - expected: FAIL - - [TypeError from request constructor takes priority - Input URL has credentials] - expected: FAIL - - [TypeError from request constructor takes priority - RequestInit's mode is navigate] - expected: FAIL - - [TypeError from request constructor takes priority - RequestInit's referrer is invalid] - expected: FAIL - - [TypeError from request constructor takes priority - RequestInit's method is invalid] - expected: FAIL - - [TypeError from request constructor takes priority - RequestInit's method is forbidden] - expected: FAIL - - [TypeError from request constructor takes priority - RequestInit's mode is no-cors and method is not simple] - expected: FAIL - - [TypeError from request constructor takes priority - RequestInit's cache mode is only-if-cached and mode is not same-origin] - expected: FAIL - - [TypeError from request constructor takes priority - Request with cache mode: only-if-cached and fetch mode cors] - expected: FAIL - - [TypeError from request constructor takes priority - Request with cache mode: only-if-cached and fetch mode no-cors] - expected: FAIL - - [TypeError from request constructor takes priority - Bad referrerPolicy init parameter value] - expected: FAIL - - [TypeError from request constructor takes priority - Bad mode init parameter value] - expected: FAIL - - [TypeError from request constructor takes priority - Bad credentials init parameter value] - expected: FAIL - - [TypeError from request constructor takes priority - Bad cache init parameter value] - expected: FAIL - - [TypeError from request constructor takes priority - Bad redirect init parameter value] - expected: FAIL - - [Signal removed by setting to null] - expected: FAIL + expected: NOTRUN [general.any.worker.html] + expected: TIMEOUT [Aborting rejects with AbortError] expected: FAIL @@ -230,31 +181,31 @@ expected: FAIL [Fetch aborted & connection closed when aborted after calling response.arrayBuffer()] - expected: FAIL + expected: TIMEOUT [Fetch aborted & connection closed when aborted after calling response.blob()] - expected: FAIL + expected: NOTRUN [Fetch aborted & connection closed when aborted after calling response.formData()] - expected: FAIL + expected: NOTRUN [Fetch aborted & connection closed when aborted after calling response.json()] - expected: FAIL + expected: NOTRUN [Fetch aborted & connection closed when aborted after calling response.text()] - expected: FAIL + expected: NOTRUN [Stream errors once aborted. Underlying connection closed.] - expected: FAIL + expected: NOTRUN [Stream errors once aborted, after reading. Underlying connection closed.] - expected: FAIL + expected: NOTRUN [Stream will not error if body is empty. It's closed with an empty queue before it errors.] - expected: FAIL + expected: NOTRUN [Readable stream synchronously cancels with AbortError if aborted before reading] - expected: FAIL + expected: NOTRUN [Signal state is cloned] expected: FAIL @@ -272,55 +223,4 @@ expected: FAIL [Fetch aborted & connection closed when aborted after calling response.bytes()] - expected: FAIL - - [TypeError from request constructor takes priority - RequestInit's window is not null] - expected: FAIL - - [TypeError from request constructor takes priority - Input URL is not valid] - expected: FAIL - - [TypeError from request constructor takes priority - Input URL has credentials] - expected: FAIL - - [TypeError from request constructor takes priority - RequestInit's mode is navigate] - expected: FAIL - - [TypeError from request constructor takes priority - RequestInit's referrer is invalid] - expected: FAIL - - [TypeError from request constructor takes priority - RequestInit's method is invalid] - expected: FAIL - - [TypeError from request constructor takes priority - RequestInit's method is forbidden] - expected: FAIL - - [TypeError from request constructor takes priority - RequestInit's mode is no-cors and method is not simple] - expected: FAIL - - [TypeError from request constructor takes priority - RequestInit's cache mode is only-if-cached and mode is not same-origin] - expected: FAIL - - [TypeError from request constructor takes priority - Request with cache mode: only-if-cached and fetch mode cors] - expected: FAIL - - [TypeError from request constructor takes priority - Request with cache mode: only-if-cached and fetch mode no-cors] - expected: FAIL - - [TypeError from request constructor takes priority - Bad referrerPolicy init parameter value] - expected: FAIL - - [TypeError from request constructor takes priority - Bad mode init parameter value] - expected: FAIL - - [TypeError from request constructor takes priority - Bad credentials init parameter value] - expected: FAIL - - [TypeError from request constructor takes priority - Bad cache init parameter value] - expected: FAIL - - [TypeError from request constructor takes priority - Bad redirect init parameter value] - expected: FAIL - - [Signal removed by setting to null] - expected: FAIL + expected: NOTRUN diff --git a/tests/wpt/meta/fetch/api/abort/keepalive.html.ini b/tests/wpt/meta/fetch/api/abort/keepalive.html.ini index f7bee07419f..46b5a14febd 100644 --- a/tests/wpt/meta/fetch/api/abort/keepalive.html.ini +++ b/tests/wpt/meta/fetch/api/abort/keepalive.html.ini @@ -1,5 +1,5 @@ [keepalive.html] - expected: ERROR + expected: TIMEOUT [aborting a keepalive fetch should work] expected: TIMEOUT diff --git a/tests/wpt/meta/fetch/api/abort/request.any.js.ini b/tests/wpt/meta/fetch/api/abort/request.any.js.ini index 4dab6e503c2..5d7ed4a13cf 100644 --- a/tests/wpt/meta/fetch/api/abort/request.any.js.ini +++ b/tests/wpt/meta/fetch/api/abort/request.any.js.ini @@ -17,42 +17,6 @@ [Calling text() on an aborted consumed nonempty request] expected: FAIL - [Calling arrayBuffer() on an aborted request] - expected: FAIL - - [Aborting a request after calling arrayBuffer()] - expected: FAIL - - [Calling arrayBuffer() on an aborted consumed empty request] - expected: FAIL - - [Calling blob() on an aborted request] - expected: FAIL - - [Aborting a request after calling blob()] - expected: FAIL - - [Calling blob() on an aborted consumed empty request] - expected: FAIL - - [Calling formData() on an aborted consumed nonempty request] - expected: FAIL - - [Calling json() on an aborted request] - expected: FAIL - - [Aborting a request after calling json()] - expected: FAIL - - [Calling text() on an aborted request] - expected: FAIL - - [Aborting a request after calling text()] - expected: FAIL - - [Calling text() on an aborted consumed empty request] - expected: FAIL - [request.any.serviceworker.html] expected: ERROR @@ -78,39 +42,3 @@ [Calling text() on an aborted consumed nonempty request] expected: FAIL - - [Calling arrayBuffer() on an aborted request] - expected: FAIL - - [Aborting a request after calling arrayBuffer()] - expected: FAIL - - [Calling arrayBuffer() on an aborted consumed empty request] - expected: FAIL - - [Calling blob() on an aborted request] - expected: FAIL - - [Aborting a request after calling blob()] - expected: FAIL - - [Calling blob() on an aborted consumed empty request] - expected: FAIL - - [Calling formData() on an aborted consumed nonempty request] - expected: FAIL - - [Calling json() on an aborted request] - expected: FAIL - - [Aborting a request after calling json()] - expected: FAIL - - [Calling text() on an aborted request] - expected: FAIL - - [Aborting a request after calling text()] - expected: FAIL - - [Calling text() on an aborted consumed empty request] - expected: FAIL