| <html><head></head><body> |
| <p>Test bug 12914 : Trying to access XMLHttpRequest.responseText or |
| responseXML when they are not available should raise an exception </p> |
| <p>Should see "PASS" four times:</p> |
| <script type="text/javascript"> |
| document.getElementById("ans").appendChild(document.createTextNode(message)); |
| document.getElementById("ans").appendChild(document.createElement("br")); |
| if (window.XMLHttpRequest) { |
| xhr = new XMLHttpRequest(); |
| xhr = new ActiveXObject("Msxml2.XMLHTTP"); |
| xhr = new ActiveXObject("Microsoft.XMLHTTP"); |
| xhr.onreadystatechange = function () { |
| if (this.readyState == num) { |
| // force the evaluation for Opera |
| var response = this.responseText; |
| if (finishedTests == 4 && window.testRunner) |
| xhr.open("GET", "resources/1251.html", true); |
| testRunner.waitUntilDone(); |
| for (i = 1; i < 5; i++) { |