Skip to content

Commit

Permalink
Bug 1503216 [wpt PR 13779] - XMLHttpRequest: manipulate Content-Type …
Browse files Browse the repository at this point in the history
…less, a=testonly

Automatic update from web-platform-testsXMLHttpRequest: manipulate Content-Type less

For whatwg/xhr#224 and in particular whatwg/mimesniff#84.

This supersedes and closes #13544.

--

wpt-commits: 99f4fdcd906411c036e96c055e28b3e6ca84a1cc
wpt-pr: 13779
  • Loading branch information
annevk authored and moz-wptsync-bot committed Nov 10, 2018
1 parent f71bbc5 commit c3562fc
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions testing/web-platform/tests/xhr/send-content-type-charset.htm
Expand Up @@ -4,8 +4,6 @@
<title>XMLHttpRequest: send() - charset parameter of Content-Type</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="help" href="https://xhr.spec.whatwg.org/#the-send()-method" data-tested-assertations="following::ol[1]/li[4]/p/code[contains(text(),'Content-Type')]/.. following::ol[1]/li[4]/p/code[contains(text(),'Content-Type')]/../following-sibling::p" />
<link rel="help" href="https://xhr.spec.whatwg.org/#dom-XMLHttpRequest-send-a-string" data-tested-assertations="following::p[2]" />
</head>
<body>
<div id="log"></div>
Expand Down Expand Up @@ -45,8 +43,8 @@
)
request(
"text/plain;charset=utf-8",
"text/plain;charset=UTF-8",
"Correct text/plain MIME with charset"
"text/plain;charset=utf-8",
"If charset= param is UTF-8 (case-insensitive), it should not be changed"
)
request(
"text/x-pink-unicorn",
Expand All @@ -70,8 +68,8 @@
)
request(
"text/plain;charset=utf-8;charset=waddup",
"text/plain;charset=UTF-8",
"charset given but wrong, fix it (known MIME, bogus charset)"
"text/plain;charset=utf-8;charset=waddup",
"If charset= param is UTF-8 (case-insensitive), it should not be changed (bogus charset)"
)
request(
"text/plain;charset=shift-jis",
Expand All @@ -81,7 +79,7 @@
request(
"text/x-pink-unicorn; charset=windows-1252; charset=bogus; notrelated; charset=ascii",
"text/x-pink-unicorn;charset=UTF-8",
"Multiple charset parameters deduplicate, bogus parameter dropped"
"Multiple non-UTF-8 charset parameters deduplicate, bogus parameter dropped"
)
request(
null,
Expand All @@ -90,20 +88,20 @@
)
request(
"text/plain;charset= utf-8",
"text/plain;charset=UTF-8",
"charset with space")
"text/plain;charset= utf-8",
"charset with space that is UTF-8 does not change")
request(
"text/plain;charset=\"utf-8\"",
"text/plain;charset=UTF-8",
"charset in double quotes")
"text/plain;charset=\"utf-8\"",
"charset in double quotes that is UTF-8 does not change")
request(
"text/plain;charset=\" utf-8\"",
"text/plain;charset=UTF-8",
"charset in double quotes with space")
request(
"text/plain;charset=\"u\\t\\f-8\"",
"text/plain;charset=UTF-8",
"charset in double quotes with backslashes")
"text/plain;charset=\"u\\t\\f-8\"",
"charset in double quotes with backslashes that is UTF-8 does not change")
request(
"YO/yo;charset=x;yo=YO; X=y",
"yo/yo;charset=UTF-8;yo=YO;x=y",
Expand Down

0 comments on commit c3562fc

Please sign in to comment.