Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / xmlhttprequest / access-control-basic-allow-async.html
blobdbc60d9a37c7dd74ca76868b0d3ee179d9f29754
1 <html>
2 <body>
3 <pre id='console'></pre>
4 <script type="text/javascript">
5 function log(message)
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);
36 xhr.send();
38 </script>
39 </body>
40 </html>