script: implement AbortController (#31361)

* Implement AbortController

Signed-off-by: syvb <me@iter.ca>

* Update WPT tests

Signed-off-by: syvb <me@iter.ca>

* Address review comments

* Fix duplicate import generation

* Update WPT test expectations

* Change expectation to FAIL for flaky test

---------

Signed-off-by: syvb <me@iter.ca>
This commit is contained in:
Smitty 2024-05-04 11:00:01 -04:00 committed by GitHub
parent 383607d01e
commit 7fce850cff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
88 changed files with 522 additions and 1194 deletions

View file

@ -1,2 +0,0 @@
[destroyed-context.html]
expected: ERROR

View file

@ -5,45 +5,13 @@
expected: ERROR
[general.any.html]
expected: TIMEOUT
[Aborting rejects with AbortError]
expected: FAIL
[Aborting rejects with AbortError - no-cors]
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
@ -77,9 +45,6 @@
[Signal retained after unrelated properties are overridden by fetch]
expected: FAIL
[Signal removed by setting to null]
expected: FAIL
[Already aborted signal rejects immediately]
expected: FAIL
@ -120,31 +85,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
@ -160,45 +125,13 @@
[general.any.worker.html]
expected: TIMEOUT
[Aborting rejects with AbortError]
expected: FAIL
[Aborting rejects with AbortError - no-cors]
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
@ -232,9 +165,6 @@
[Signal retained after unrelated properties are overridden by fetch]
expected: FAIL
[Signal removed by setting to null]
expected: FAIL
[Already aborted signal rejects immediately]
expected: FAIL
@ -275,31 +205,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

View file

@ -1,2 +1,7 @@
[keepalive.html]
expected: ERROR
expected: TIMEOUT
[aborting a keepalive fetch should work]
expected: TIMEOUT
[aborting a detached keepalive fetch should not do anything]
expected: NOTRUN

View file

@ -1,25 +1,7 @@
[request.any.html]
[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 arrayBuffer() on an aborted consumed nonempty 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 blob() on an aborted consumed nonempty request]
expected: FAIL
@ -29,27 +11,9 @@
[Aborting a request after calling formData()]
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 json() on an aborted consumed nonempty request]
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
[Calling text() on an aborted consumed nonempty request]
expected: FAIL
@ -61,27 +25,9 @@
expected: ERROR
[request.any.worker.html]
[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 arrayBuffer() on an aborted consumed nonempty 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 blob() on an aborted consumed nonempty request]
expected: FAIL
@ -91,26 +37,8 @@
[Aborting a request after calling formData()]
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 json() on an aborted consumed nonempty request]
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
[Calling text() on an aborted consumed nonempty request]
expected: FAIL