Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / xmlhttprequest / access-control-basic-allow-star.html
bloba43faad5fbf71c407f5471be6173470baa89995d
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();
13 (function() {
14 var xhr = new XMLHttpRequest;
16 try {
17 xhr.open("GET", "http://localhost:8000/xmlhttprequest/resources/access-control-basic-allow-star.cgi", false);
18 } catch(e) {
19 log("FAIL: Exception thrown. Cross-domain access is not allowed in 'open'. [" + e.message + "].");
20 return;
23 try {
24 xhr.send();
25 } catch(e) {
26 log("FAIL: Exception thrown. Cross-domain access is not allowed in 'send'. [" + e.message + "].");
27 return;
30 log(xhr.responseText);
31 })();
33 if (window.testRunner)
34 testRunner.notifyDone();
35 </script>
36 </body>
37 </html>