| <html> |
| <body> |
| <script> |
| |
| window.onload = function() { |
| var xhr = new XMLHttpRequest(); |
| xhr.onload = function() { |
| alert("FAIL: load was not blocked"); |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| }; |
| |
| setTimeout(function() { |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| }, 2000); |
| |
| try { |
| xhr.open("GET", "http://127.0.0.1:8000/xmlhttprequest/resources/access-control-basic-allow-star.cgi", false); |
| } catch (ex) { |
| // Firefox raises an exception, which is one way to make this detectable. |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| } |
| |
| xhr.send(null); |
| }; |
| </script> |
| |
| </body> |
| </html> |