3 <pre id='console'
></pre>
4 <script type=
"text/javascript">
7 document
.getElementById('console').appendChild(document
.createTextNode(message
+ "\n"));
10 if (window
.testRunner
) {
11 testRunner
.dumpAsText();
12 testRunner
.waitUntilDone();
15 function processStateChange()
17 if (xhr
.readyState
== xhr
.DONE
) {
18 log(xhr
.responseText
);
19 if (window
.testRunner
)
20 testRunner
.notifyDone();
24 function errorHandler()
26 log("FAIL: Network error.");
27 if (window
.testRunner
)
28 testRunner
.notifyDone();
31 var xhr
= new XMLHttpRequest
;
32 xhr
.onreadystatechange
= processStateChange
;
33 xhr
.onerror
= errorHandler
;
35 xhr
.open("GET", "http://localhost:8000/xmlhttprequest/resources/access-control-basic-allow.cgi", true);