script: Implement the Bytes() method on Request and Response (#35250)

* Implement the Bytes() method on Request and Response

Signed-off-by: Shane Handley <shanehandley@fastmail.com>

* avoid unsafe code during buffer creation

Signed-off-by: Shane Handley <shanehandley@fastmail.com>

---------

Signed-off-by: Shane Handley <shanehandley@fastmail.com>
This commit is contained in:
shanehandley 2025-02-02 18:49:48 +11:00 committed by GitHub
parent f364b3f6ea
commit 938baf6bf3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 33 additions and 149 deletions

View file

@ -14,16 +14,6 @@
[Request interface: attribute duplex]
expected: FAIL
[Request interface: operation arrayBuffer()]
[Request interface: operation blob()]
[Request interface: operation formData()]
[Request interface: operation json()]
[Request interface: operation text()]
[Request interface: new Request('about:blank') must inherit property "keepalive" with the proper type]
expected: FAIL
@ -42,35 +32,9 @@
[Response interface: operation json(any, optional ResponseInit)]
expected: FAIL
[Response interface: operation arrayBuffer()]
[Response interface: operation blob()]
[Response interface: operation formData()]
[Response interface: operation json()]
[Response interface: operation text()]
[Response interface: calling json(any, optional ResponseInit) on new Response() with too few arguments must throw TypeError]
expected: FAIL
[WorkerGlobalScope interface: operation fetch(RequestInfo, optional RequestInit)]
[WorkerGlobalScope interface: calling fetch(RequestInfo, optional RequestInit) on self with too few arguments must throw TypeError]
[Request interface: operation bytes()]
expected: FAIL
[Request interface: new Request('about:blank') must inherit property "bytes()" with the proper type]
expected: FAIL
[Response interface: operation bytes()]
expected: FAIL
[Response interface: new Response() must inherit property "bytes()" with the proper type]
expected: FAIL
[idlharness.any.sharedworker.html]
expected: ERROR
@ -91,16 +55,6 @@
[Request interface: attribute duplex]
expected: FAIL
[Request interface: operation arrayBuffer()]
[Request interface: operation blob()]
[Request interface: operation formData()]
[Request interface: operation json()]
[Request interface: operation text()]
[Request interface: new Request('about:blank') must inherit property "keepalive" with the proper type]
expected: FAIL
@ -119,35 +73,9 @@
[Response interface: operation json(any, optional ResponseInit)]
expected: FAIL
[Response interface: operation arrayBuffer()]
[Response interface: operation blob()]
[Response interface: operation formData()]
[Response interface: operation json()]
[Response interface: operation text()]
[Response interface: calling json(any, optional ResponseInit) on new Response() with too few arguments must throw TypeError]
expected: FAIL
[Window interface: operation fetch(RequestInfo, optional RequestInit)]
[Window interface: calling fetch(RequestInfo, optional RequestInit) on window with too few arguments must throw TypeError]
[Request interface: operation bytes()]
expected: FAIL
[Request interface: new Request('about:blank') must inherit property "bytes()" with the proper type]
expected: FAIL
[Response interface: operation bytes()]
expected: FAIL
[Response interface: new Response() must inherit property "bytes()" with the proper type]
expected: FAIL
[idlharness.any.serviceworker.html]
expected: ERROR