Revision ad4489b5132d14d65cdb52845d1c1f8694b9d4cc authored by Ms2ger on 13 March 2018, 16:12:19 UTC, committed by Ms2ger on 11 April 2018, 07:18:10 UTC
1 parent d44cd21
getallresponseheaders.htm
<!doctype html>
<title>XMLHttpRequest: getAllResponseHeaders()</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<div id="log"></div>
<script>
async_test((t) => {
const client = new XMLHttpRequest()
client.onload = t.step_func_done(() => {
assert_equals(client.getAllResponseHeaders(), "foo-test: 1, 2, 3\r\n")
})
client.onerror = t.unreached_func("unexpected error")
client.open("GET", "resources/headers-basic.asis")
client.send(null)
})
async_test((t) => {
const client = new XMLHttpRequest()
client.onload = t.step_func_done(() => {
assert_equals(client.getAllResponseHeaders(), "also-here: Mr. PB\r\newok: lego\r\nfoo-test: 1, 2\r\n")
})
client.onerror = t.unreached_func("unexpected error")
client.open("GET", "resources/headers.asis")
client.send(null)
})
test(() => {
const client = new XMLHttpRequest
client.open("GET", "resources/header-content-length.asis", false)
client.send()
assert_equals(client.getAllResponseHeaders(), "content-length: 0\r\n")
})
</script>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...