3 <p>Test for
<a href=
"https://bugs.webkit.org/show_bug.cgi?id=36854">bug
36854<a>:
4 Body from cross origin preflight response is prepended to the actual response body.
</p>
5 <div id=result
>Running test...
</div>
9 testRunner
.dumpAsText();
11 window
.onload = function() {
12 var xhr
= new XMLHttpRequest();
13 xhr
.open("GET","http://localhost:8000/xmlhttprequest/resources/access-control-allow-with-body.php", false);
14 xhr
.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
15 xhr
.setRequestHeader("X-Requested-With", "XMLHttpRequest");
18 document
.getElementById("result").innerHTML
= (xhr
.responseText
== "echo") ? "PASS" : ("FAIL: " + xhr
.responseText
);