| <html> | |
| <head> | |
| <title> Page test for bug 14898</title> | |
| </head> | |
| <body> | |
| <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> | |
| <script type="text/javascript"> | |
| if (window.testRunner) { | |
| testRunner.dumpAsText(); | |
| testRunner.waitUntilDone(); | |
| } | |
| var xhr = new XMLHttpRequest(); | |
| xhr.onreadystatechange = function() { | |
| if (this.readyState == 4) { | |
| var responses = this.getAllResponseHeaders(); | |
| if (responses == null || responses == "") { //Check that headers were received | |
| document.body.appendChild(document.createTextNode("No header received !!!! ")); | |
| } | |
| if (responses.indexOf('\r\n') == -1) { | |
| document.body.appendChild(document.createTextNode("FAILED")); | |
| } else { | |
| document.body.appendChild(document.createTextNode("PASS")); | |
| } | |
| if (window.testRunner) | |
| testRunner.notifyDone(); | |
| } | |
| } | |
| xhr.open("GET", "testPage.html", true); | |
| xhr.send(null); | |
| </script> | |
| </body> | |
| </html> |