Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request duplex property #36051

Merged
merged 2 commits into from
Sep 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions fetch/api/request/request-structure.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ var attributes = ["method",
"integrity",
"isReloadNavigation",
"isHistoryNavigation",
"duplex",
//Request implements Body
"bodyUsed"
];

function IsreadOnly(request, attributeToCheck) {
function isReadOnly(request, attributeToCheck) {
var defaultValue = undefined;
var newValue = undefined;
switch (attributeToCheck) {
Expand All @@ -46,7 +47,6 @@ function IsreadOnly(request, attributeToCheck) {
request.headers = new Headers ({"name":"value"});
assert_false(request.headers.has("name"), "Headers attribute is read only");
return;
break;

case "destination":
defaultValue = "";
Expand Down Expand Up @@ -102,6 +102,11 @@ function IsreadOnly(request, attributeToCheck) {
newValue = true;
break;

case "duplex":
defaultValue = "half";
newValue = "full";
break;

default:
return;
}
Expand All @@ -123,6 +128,6 @@ for (var idx in methods) {
for (var idx in attributes) {
test(function() {
assert_true(attributes[idx] in request, "request has " + attributes[idx] + " attribute");
IsreadOnly(request, attributes[idx]);
isReadOnly(request, attributes[idx]);
}, "Check " + attributes[idx] + " attribute");
}