3 <title> Page test for bug
14898</title>
6 <p>Test page for the
<a href=
"http://bugs.webkit.org/show_bug.cgi?id=14898">bug
14898</a> : XMLHttpRequest.getAllResponseHeaders should separate headers with CRLF
</p>
7 <script type=
"text/javascript">
9 if (window
.testRunner
) {
10 testRunner
.dumpAsText();
11 testRunner
.waitUntilDone();
14 var xhr
= new XMLHttpRequest();
15 xhr
.onreadystatechange = function() {
16 if (this.readyState
== 4) {
17 var responses
= this.getAllResponseHeaders();
18 if (responses
== null || responses
== "") { //Check that headers were received
19 document
.body
.appendChild(document
.createTextNode("No header received !!!! "));
22 if (responses
.indexOf('\r\n') == -1) {
23 document
.body
.appendChild(document
.createTextNode("FAILED"));
25 document
.body
.appendChild(document
.createTextNode("PASS"));
28 if (window
.testRunner
)
29 testRunner
.notifyDone();
32 xhr
.open("GET", "testPage.html", true);