Allow Request's Headers to be created with various objects

While Headers could be constructed correctly with an array or
object (open ended dictionary/MozMap), Request's Headers failed to be
created with non-Headers object (such as array or open ended
dictionary/MozMap).

Before, Request's Headers could be filled with only a Headers object in
Step 28. This has been expanded to accommodate array and open ended
dictionary.

Step 29 empties the Request's Headers list after it had been filled in
Step 28, thus resulting in an empty Headers object when it shouldn't
be. This step has been removed with a comment in this commit.

If a RequestInit Headers is *not* given, but a RequestInfo Headers is
given, RequestInfo Headers should be used to construct Request
Headers. That step has been added after Step 31.

Corresponding wpt result is updated in this commit.
This commit is contained in:
Jeena Lee 2016-10-14 16:32:21 -07:00
parent f4cb87a783
commit 94ea24e47b
2 changed files with 27 additions and 14 deletions

View file

@ -1,8 +1,5 @@
[request-headers.html]
type: testharness
[Testing request header creations with various objects]
expected: FAIL
[Testing empty Request Content-Type header]
expected: FAIL