gecko-dev/testing/web-platform/tests/XMLHttpRequest/setrequestheader-header-allowed.htm
James Graham 1ddbbd48c5 Bug 1201822 - Update web-platform-tests to revision d0571e01e1a2e4b8c5f696af2f81cbc1be9a5842, a=testonly
--HG--
rename : testing/web-platform/tests/content-security-policy/blink-contrib/combine-multiple-policies.sub.html.sub.headers => testing/web-platform/tests/content-security-policy/blink-contrib/combine-header-and-meta-policies.sub.html.sub.headers
rename : testing/web-platform/tests/content-security-policy/blink-contrib/resources/shared-worker-make-xhr-blocked.js.sub.headers => testing/web-platform/tests/content-security-policy/blink-contrib/resources/shared-worker-make-xhr-blocked.sub.js.sub.headers
rename : testing/web-platform/tests/content-security-policy/blink-contrib/resources/worker-make-xhr-blocked.js.sub.headers => testing/web-platform/tests/content-security-policy/blink-contrib/resources/worker-make-xhr-blocked.sub.js.sub.headers
rename : testing/web-platform/tests/quirks-mode/font-element-text-decoration-color/001-a.html => testing/web-platform/tests/html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-a.html
rename : testing/web-platform/tests/quirks-mode/font-element-text-decoration-color/001-q.html => testing/web-platform/tests/html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-q.html
rename : testing/web-platform/tests/quirks-mode/font-element-text-decoration-color/001-ref.html => testing/web-platform/tests/html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-ref.html
rename : testing/web-platform/tests/quirks-mode/font-element-text-decoration-color/001-s.html => testing/web-platform/tests/html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-s.html
rename : testing/web-platform/tests/quirks-mode/font-element-text-decoration-color/001-x.xhtml => testing/web-platform/tests/html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-x.xhtml
2015-09-04 10:39:26 +01:00

33 lines
1.2 KiB
HTML

<!doctype html>
<html>
<head>
<title>XMLHttpRequest: setRequestHeader() - headers that are allowed</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="help" href="https://xhr.spec.whatwg.org/#the-setrequestheader()-method" data-tested-assertations="/following::ol/li[6] /following::ol/li[7]" />
</head>
<body>
<div id="log"></div>
<script>
function request(header) {
test(function() {
var client = new XMLHttpRequest()
client.open("POST", "resources/inspect-headers.py?filter_value=t1, t2", false)
client.setRequestHeader(header, "t1")
client.setRequestHeader(header, "t2")
client.send(null)
assert_equals(client.responseText, header.toLowerCase() + ",")
}, document.title + " (" + header + ")")
}
request("Authorization")
request("Pragma")
request("User-Agent")
request("Content-Transfer-Encoding")
request("Content-Type")
request("Overwrite")
request("If")
request("Status-URI")
request("X-Pink-Unicorn")
</script>
</body>
</html>