From 195c33940fb6769c86339e2fc1983556f1bb2862 Mon Sep 17 00:00:00 2001 From: Yutaka Hirano Date: Mon, 4 Jul 2022 04:18:19 -0700 Subject: [PATCH] Introduce RequestInit.duplex This implements https://github.com/whatwg/fetch/pull/1457. Bug: 1337696 Change-Id: I3fcf6f484dc922f5a875ed658adad33631d55115 --- fetch/api/basic/request-upload.h2.any.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fetch/api/basic/request-upload.h2.any.js b/fetch/api/basic/request-upload.h2.any.js index 70d11eca76694ba..77ed9f8eb62b578 100644 --- a/fetch/api/basic/request-upload.h2.any.js +++ b/fetch/api/basic/request-upload.h2.any.js @@ -59,6 +59,7 @@ promise_test(async (test) => { const request = new Request('', { body: new ReadableStream(), method: 'POST', + duplex, }); assert_equals(request.headers.get('Content-Type'), null, `Request should not have a content-type set`); @@ -66,6 +67,7 @@ promise_test(async (test) => { const response = await fetch('data:a/a;charset=utf-8,test', { method: 'POST', body: new ReadableStream(), + duplex, }); assert_equals(await response.text(), 'test', `Response has correct body`); @@ -75,6 +77,7 @@ promise_test(async (test) => { const request = new Request('data:a/a;charset=utf-8,test', { body: new ReadableStream(), method: 'POST', + duplex, }); assert_equals(request.headers.get('Content-Type'), null, `Request should not have a content-type set`);