Re: [xhr-tests] XMLHttpRequest: make various header tests much more strict (#5008)

 [View the complete job log.](https://travis-ci.org/w3c/web-platform-tests/jobs/204932412)

# Chrome (unstable channel) #
Testing web-platform-tests at revision 8cda8e52d733d4562754b085230418147c3fca62
Using browser at version 58.0.3018.3 dev
Starting 10 test iterations
All results were stable
## All results ##
<details>
<summary>12 tests ran</summary>
<details>
<summary><a href="http://w3c-test.org/submissions/5008/XMLHttpRequest/anonymous-mode-unsupported.htm">/XMLHttpRequest/anonymous-mode-unsupported.htm</a></summary>


|                   Subtest                    | Results |
|----------------------------------------------|---------|
|                                              | OK      |
| `XMLHttpRequest: anonymous mode unsupported` | PASS    |

</details>
<details>
<summary><a href="http://w3c-test.org/submissions/5008/XMLHttpRequest/setrequestheader-open-setrequestheader.htm">/XMLHttpRequest/setrequestheader-open-setrequestheader.htm</a></summary>


|                     Subtest                     | Results |
|-------------------------------------------------|---------|
|                                                 | OK      |
| `XMLHttpRequest: setRequestHeader() and open()` | PASS    |

</details>
<details>
<summary><a href="http://w3c-test.org/submissions/5008/XMLHttpRequest/setrequestheader-header-forbidden.htm">/XMLHttpRequest/setrequestheader-header-forbidden.htm</a></summary>


|                              Subtest                              | Results |
|-------------------------------------------------------------------|---------|
|                                                                   | OK      |
| `XMLHttpRequest: setRequestHeader() - headers that are forbidden` | PASS    |

</details>
<details>
<summary><a href="http://w3c-test.org/submissions/5008/XMLHttpRequest/send-accept-language.htm">/XMLHttpRequest/send-accept-language.htm</a></summary>


|                       Subtest                        | Results |
|------------------------------------------------------|---------|
|                                                      | OK      |
| `XMLHttpRequest: send() - Accept-Language`           | PASS    |
| `Send "sensible" default value, whatever that means` | PASS    |

</details>
<details>
<summary><a href="http://w3c-test.org/submissions/5008/XMLHttpRequest/setrequestheader-content-type.htm">/XMLHttpRequest/setrequestheader-content-type.htm</a></summary>


|                                                     Subtest                                                     | Results |
|-----------------------------------------------------------------------------------------------------------------|---------|
|                                                                                                                 | OK      |
| `URLSearchParams request has correct default Content-Type of "application/x-www-form-urlencoded;charset=UTF-8"` | FAIL    |
| `ArrayBufferView request keeps setRequestHeader() Content-Type and charset`                                     | PASS    |
| `FormData request has correct default Content-Type of "multipart/form-data; boundary=_"`                        | PASS    |
| `ArrayBufferView request respects setRequestHeader("")`                                                         | FAIL    |
| `setRequestHeader(" ") sends the string " "`                                                                    | FAIL    |
| `FormData request respects setRequestHeader("")`                                                                | FAIL    |
| `FormData request keeps setRequestHeader() Content-Type and charset`                                            | PASS    |
| `ArrayBuffer request respects setRequestHeader("")`                                                             | FAIL    |
| `String request has correct default Content-Type of "text/plain;charset=UTF-8"`                                 | PASS    |
| `setRequestHeader(null) sends the string "null"`                                                                | PASS    |
| `Blob request with unset type keeps setRequestHeader() Content-Type and charset`                                | PASS    |
| `ReadableStream request keeps setRequestHeader() Content-Type and charset`                                      | FAIL    |
| `ArrayBuffer request sends no Content-Type without setRequestHeader() call`                                     | PASS    |
| `ReadableStream request with under type sends no Content-Type without setRequestHeader() call`                  | FAIL    |
| `setRequestHeader("") sends a blank string`                                                                     | FAIL    |
| `setRequestHeader(undefined) sends the string "undefined"`                                                      | PASS    |
| `URLSearchParams respects setRequestHeader("")`                                                                 | FAIL    |
| `Blob request with set type keeps setRequestHeader() Content-Type and charset`                                  | PASS    |
| `HTML Document request has correct default Content-Type of "text/html;charset=UTF-8"`                           | FAIL    |
| `ReadableStream request respects setRequestHeader("")`                                                          | FAIL    |
| `HTML Document request keeps setRequestHeader() Content-Type, with charset adjusted to UTF-8`                   | FAIL    |
| `ArrayBufferView request sends no Content-Type without setRequestHeader() call`                                 | PASS    |
| `Blob request with set type uses that it for Content-Type unless setRequestHeader()`                            | PASS    |
| `ArrayBuffer request keeps setRequestHeader() Content-Type and charset`                                         | PASS    |
| `XML Document request respects setRequestHeader("")`                                                            | FAIL    |
| `XML Document request has correct default Content-Type of "application/xml;charset=UTF-8"`                      | PASS    |
| `Blob request with unset type sends no Content-Type without setRequestHeader() call`                            | PASS    |
| `XML Document request keeps setRequestHeader() Content-Type, with charset adjusted to UTF-8`                    | FAIL    |
| `String request keeps setRequestHeader() Content-Type, with charset adjusted to UTF-8`                          | PASS    |
| `HTML Document request respects setRequestHeader("")`                                                           | FAIL    |
| `Blob request respects setRequestHeader("") to be specified`                                                    | FAIL    |
| `URLSearchParams request keeps setRequestHeader() Content-Type, with charset adjusted to UTF-8`                 | PASS    |

</details>
<details>
<summary><a href="http://w3c-test.org/submissions/5008/XMLHttpRequest/setrequestheader-allow-empty-value.htm">/XMLHttpRequest/setrequestheader-allow-empty-value.htm</a></summary>


|                             Subtest                             | Results |
|-----------------------------------------------------------------|---------|
|                                                                 | OK      |
| `XMLHttpRequest: setRequestHeader() - empty header ()`          | FAIL    |
| `XMLHttpRequest: setRequestHeader() - empty header (undefined)` | PASS    |
| `XMLHttpRequest: setRequestHeader() - empty header (null)`      | PASS    |

</details>
<details>
<summary><a href="http://w3c-test.org/submissions/5008/XMLHttpRequest/open-after-setrequestheader.htm">/XMLHttpRequest/open-after-setrequestheader.htm</a></summary>


|                      Subtest                      | Results |
|---------------------------------------------------|---------|
|                                                   | OK      |
| `XMLHttpRequest: open() after setRequestHeader()` | PASS    |

</details>
<details>
<summary><a href="http://w3c-test.org/submissions/5008/XMLHttpRequest/preserve-ua-header-on-redirect.htm">/XMLHttpRequest/preserve-ua-header-on-redirect.htm</a></summary>


|                            Subtest                             | Results |
|----------------------------------------------------------------|---------|
|                                                                | OK      |
| `XMLHttpRequest: User-Agent header is preserved on redirect`   | PASS    |
| `XMLHttpRequest: User-Agent header is preserved on redirect 1` | FAIL    |

</details>
<details>
<summary><a href="http://w3c-test.org/submissions/5008/XMLHttpRequest/open-referer.htm">/XMLHttpRequest/open-referer.htm</a></summary>


|                      Subtest                       | Results |
|----------------------------------------------------|---------|
|                                                    | OK      |
| `XMLHttpRequest: open() - value of Referer header` | PASS    |

</details>
<details>
<summary><a href="http://w3c-test.org/submissions/5008/XMLHttpRequest/setrequestheader-case-insensitive.htm">/XMLHttpRequest/setrequestheader-case-insensitive.htm</a></summary>


|                              Subtest                               | Results |
|--------------------------------------------------------------------|---------|
|                                                                    | OK      |
| `XMLHttpRequest: setRequestHeader() - headers that differ in case` | PASS    |

</details>
<details>
<summary><a href="http://w3c-test.org/submissions/5008/XMLHttpRequest/setrequestheader-header-allowed.htm">/XMLHttpRequest/setrequestheader-header-allowed.htm</a></summary>


|                                           Subtest                                           | Results |
|---------------------------------------------------------------------------------------------|---------|
|                                                                                             | OK      |
| `XMLHttpRequest: setRequestHeader() - headers that are allowed (Authorization)`             | PASS    |
| `XMLHttpRequest: setRequestHeader() - headers that are allowed (User-Agent)`                | FAIL    |
| `XMLHttpRequest: setRequestHeader() - headers that are allowed (Content-Type)`              | PASS    |
| `XMLHttpRequest: setRequestHeader() - headers that are allowed (Overwrite)`                 | PASS    |
| `XMLHttpRequest: setRequestHeader() - headers that are allowed (X-Pink-Unicorn)`            | PASS    |
| `XMLHttpRequest: setRequestHeader() - headers that are allowed (Pragma)`                    | PASS    |
| `XMLHttpRequest: setRequestHeader() - headers that are allowed (Status-URI)`                | PASS    |
| `XMLHttpRequest: setRequestHeader() - headers that are allowed (If)`                        | PASS    |
| `XMLHttpRequest: setRequestHeader() - headers that are allowed (Content-Transfer-Encoding)` | PASS    |

</details>
<details>
<summary><a href="http://w3c-test.org/submissions/5008/XMLHttpRequest/setrequestheader-allow-whitespace-in-value.htm">/XMLHttpRequest/setrequestheader-allow-whitespace-in-value.htm</a></summary>


|                                  Subtest                                  | Results |
|---------------------------------------------------------------------------|---------|
|                                                                           | OK      |
| `XMLHttpRequest: setRequestHeader() - header value with whitespace ( )`   | FAIL    |
| `XMLHttpRequest: setRequestHeader() - header value with whitespace (t )`  | PASS    |
| `XMLHttpRequest: setRequestHeader() - header value with whitespace ( t)`  | PASS    |
| `XMLHttpRequest: setRequestHeader() - header value with whitespace ( t )` | PASS    |

</details>
</details>

View on GitHub: https://github.com/w3c/web-platform-tests/pull/5008#issuecomment-282268994

Received on Friday, 24 February 2017 11:23:16 UTC