Skip to content

Commit 9db961d

Browse files
jakearchibaldmoz-wptsync-bot
authored andcommitted
Bug 1792192 [wpt PR 36051] - Request duplex property, a=testonly
Automatic update from web-platform-tests Fetch: Request duplex property For whatwg/fetch#1493. -- wpt-commits: 8fdd0c4c592ac976d264f30e87dc26b0150b4f70 wpt-pr: 36051
1 parent bc1cd32 commit 9db961d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

testing/web-platform/tests/fetch/api/request/request-structure.any.js

+8-3
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@ var attributes = ["method",
2323
"integrity",
2424
"isReloadNavigation",
2525
"isHistoryNavigation",
26+
"duplex",
2627
//Request implements Body
2728
"bodyUsed"
2829
];
2930

30-
function IsreadOnly(request, attributeToCheck) {
31+
function isReadOnly(request, attributeToCheck) {
3132
var defaultValue = undefined;
3233
var newValue = undefined;
3334
switch (attributeToCheck) {
@@ -46,7 +47,6 @@ function IsreadOnly(request, attributeToCheck) {
4647
request.headers = new Headers ({"name":"value"});
4748
assert_false(request.headers.has("name"), "Headers attribute is read only");
4849
return;
49-
break;
5050

5151
case "destination":
5252
defaultValue = "";
@@ -102,6 +102,11 @@ function IsreadOnly(request, attributeToCheck) {
102102
newValue = true;
103103
break;
104104

105+
case "duplex":
106+
defaultValue = "half";
107+
newValue = "full";
108+
break;
109+
105110
default:
106111
return;
107112
}
@@ -123,6 +128,6 @@ for (var idx in methods) {
123128
for (var idx in attributes) {
124129
test(function() {
125130
assert_true(attributes[idx] in request, "request has " + attributes[idx] + " attribute");
126-
IsreadOnly(request, attributes[idx]);
131+
isReadOnly(request, attributes[idx]);
127132
}, "Check " + attributes[idx] + " attribute");
128133
}

0 commit comments

Comments
 (0)