From 8e892edf7736c4a0d1352d385da980d89a6022c2 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Wed, 11 Dec 2019 13:40:16 +0100 Subject: [PATCH] Fetch: remove support for Response's trailer See https://github.com/whatwg/fetch/pull/979. --- fetch/api/basic/historical.any.js | 16 +++++++++++++ fetch/api/headers/historical.any.js | 4 ---- .../request-type-attribute-historical.html | 11 --------- fetch/api/response/response-trailer.html | 24 ------------------- 4 files changed, 16 insertions(+), 39 deletions(-) create mode 100644 fetch/api/basic/historical.any.js delete mode 100644 fetch/api/headers/historical.any.js delete mode 100644 fetch/api/request/request-type-attribute-historical.html delete mode 100644 fetch/api/response/response-trailer.html diff --git a/fetch/api/basic/historical.any.js b/fetch/api/basic/historical.any.js new file mode 100644 index 00000000000000..2c67166b4f799e --- /dev/null +++ b/fetch/api/basic/historical.any.js @@ -0,0 +1,16 @@ +test(() => { + assert_false("getAll" in new Headers); + assert_false("getAll" in Headers.prototype); +}, "Headers object no longer has a getAll() method"); + +test(() => { + const request = new Request("https://domfarolino.com"); + assert_equals(request.type, undefined); + assert_false("type" in Request.prototype); +}, "'type' getter should not exist on Request objects"); + +// See https://github.com/whatwg/fetch/pull/979 for the removal +test(() => { + assert_false("trailer" in new Response()); + assert_false("trailer" in Response.prototype); +}, "Response object no longer has a trailer getter"); diff --git a/fetch/api/headers/historical.any.js b/fetch/api/headers/historical.any.js deleted file mode 100644 index af676d258d29a2..00000000000000 --- a/fetch/api/headers/historical.any.js +++ /dev/null @@ -1,4 +0,0 @@ -test(() => { - assert_false("getAll" in new Headers) - assert_false("getAll" in Headers.prototype) -}, "Headers object no longer has a getAll() method") diff --git a/fetch/api/request/request-type-attribute-historical.html b/fetch/api/request/request-type-attribute-historical.html deleted file mode 100644 index e0768759b00c15..00000000000000 --- a/fetch/api/request/request-type-attribute-historical.html +++ /dev/null @@ -1,11 +0,0 @@ - -Request.type attribute should not exist - - -
- diff --git a/fetch/api/response/response-trailer.html b/fetch/api/response/response-trailer.html deleted file mode 100644 index cbea155d4dd845..00000000000000 --- a/fetch/api/response/response-trailer.html +++ /dev/null @@ -1,24 +0,0 @@ - -trailer() test - - -
- -