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

Reflect HeadersInit changes #4240

Merged
merged 1 commit into from
Nov 24, 2016
Merged
Show file tree
Hide file tree
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
10 changes: 9 additions & 1 deletion fetch/api/headers/headers-basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
assert_equals(headers.get(name), String(headerDict[name]),
"name: " + name + " has value: " + headerDict[name]);
}
}, "Create headers with OpenEndedDictionary");
}, "Create headers with record");

test(function() {
var headers = new Headers(headerDict);
Expand All @@ -68,6 +68,14 @@
}
}, "Create headers with existing headers");

test(function() {
var headers = new Headers({test:"test"});
var headers2 = new Headers()
headers2[Symbol.iterator] = headers[Symbol.iterator]
var headers3 = new Headers(headers2)
assert_equals(headers3.get("test"), "test")
}, "Create headers with existing headers with custom iterator");

test(function() {
var headers = new Headers();
for (name in headerDict) {
Expand Down
2 changes: 1 addition & 1 deletion fetch/api/headers/headers-idl.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</head>
<body>
<script id="headers-idl" type="text/plain">
typedef (Headers or sequence<sequence<ByteString>> or OpenEndedDictionary<ByteString>) HeadersInit;
typedef (sequence<sequence<ByteString>> or record<ByteString>) HeadersInit;

[Constructor(optional HeadersInit init),
Exposed=(Window,Worker)]
Expand Down