2 <p>Test for
<a href=
"http://bugs.webkit.org/show_bug.cgi?id=11611">bug
11611</a>:
3 REGRESSION: No http referer header sent on XMLHttpRequest.
</p>
5 <div id=sync
>sync:
</div>
6 <div id=async
>async:
</div>
9 if (window
.testRunner
) {
10 testRunner
.dumpAsText();
11 testRunner
.waitUntilDone();
14 req
= new XMLHttpRequest
;
15 req
.open("GET", "resources/print-referer.cgi", false);
17 if (req
.responseText
== document
.URL
)
18 document
.getElementById("sync").firstChild
.data
+= "OK";
20 document
.getElementById("sync").firstChild
.data
+= req
.responseText
;
22 req
.open("GET", "resources/print-referer.cgi", true);
23 req
.onreadystatechange
= processStateChange
;
26 function processStateChange() {
27 if (req
.readyState
== 4) {
28 if (req
.responseText
== document
.URL
)
29 document
.getElementById("async").firstChild
.data
+= "OK";
31 document
.getElementById("async").firstChild
.data
+= req
.responseText
;
32 if (window
.testRunner
)
33 testRunner
.notifyDone();