1 <base href=
"http://localhost:8000/"></base>
3 if (window
.testRunner
) {
4 testRunner
.dumpAsText();
5 testRunner
.waitUntilDone();
10 function preflightRequest() {
11 var xhr
= new XMLHttpRequest();
12 xhr
.onsuccess = function() { finish("FAIL"); }
13 xhr
.onerror = function() {
14 if (requestCount
== 5) {
19 // This hack of showing and hiding the inspector greatly increases the likelihood
20 // that references to the CachedResource underlying the XHR get cleaned out.
21 if (window
.testRunner
) {
22 testRunner
.showWebInspector();
23 testRunner
.closeWebInspector();
27 xhr
.open("GET", "xmlhttprequest/resources/access-control-basic-denied.cgi");
31 function finish(result
) {
32 document
.body
.appendChild(document
.createTextNode(result
));
33 if (window
.testRunner
)
34 testRunner
.notifyDone();
37 <body onload=
"preflightRequest()"></body>