| <html> | |
| <body> | |
| <pre id='console'></pre> | |
| <script type="text/javascript"> | |
| function log(message) | |
| { | |
| document.getElementById('console').appendChild(document.createTextNode(message + "\n")); | |
| } | |
| if (window.testRunner) | |
| testRunner.dumpAsText(); | |
| (function() { | |
| var xhr = new XMLHttpRequest; | |
| try { | |
| xhr.open("GET", "http://localhost:8000/xmlhttprequest/resources/access-control-basic-allow-star.cgi", false); | |
| } catch(e) { | |
| log("FAIL: Exception thrown. Cross-domain access is not allowed in 'open'. [" + e.message + "]."); | |
| return; | |
| } | |
| try { | |
| xhr.send(); | |
| } catch(e) { | |
| log("FAIL: Exception thrown. Cross-domain access is not allowed in 'send'. [" + e.message + "]."); | |
| return; | |
| } | |
| log(xhr.responseText); | |
| })(); | |
| if (window.testRunner) | |
| testRunner.notifyDone(); | |
| </script> | |
| </body> | |
| </html> |