3 <p>Test async xhr preflight cache denial. If this test passes, there should be a single PASS below.
</p>
5 if (window
.testRunner
) {
6 testRunner
.dumpAsText();
7 testRunner
.waitUntilDone();
10 var console_messages
= document
.createElement("ul");
11 document
.body
.appendChild(console_messages
);
15 var item
= document
.createElement("li");
16 item
.appendChild(document
.createTextNode(message
));
17 console_messages
.appendChild(item
);
20 xhr
= new XMLHttpRequest
;
21 xhr
.onreadystatechange
= processStateChange
;
23 xhr
.open("FOO", "http://localhost:8000/xmlhttprequest/resources/access-control-basic-denied.cgi");
26 log("Got exception.");
29 function processStateChange() {
30 if (xhr
.readyState
== 1)
32 else if (xhr
.readyState
== 4) {
33 if (window
.testRunner
)
34 testRunner
.notifyDone();