5 <p>Test bug
12914 : Trying to access XMLHttpRequest.responseText or responseXML when they are not available should raise an exception
</p>
6 <p>Should see
"PASS" four times:
</p>
9 <script type=
"text/javascript">
10 function log(message
) {
11 document
.getElementById("ans").appendChild(document
.createTextNode(message
));
12 document
.getElementById("ans").appendChild(document
.createElement("br"));
19 if (window
.XMLHttpRequest
) {
20 xhr
= new XMLHttpRequest();
23 xhr
= new ActiveXObject("Msxml2.XMLHTTP");
25 xhr
= new ActiveXObject("Microsoft.XMLHTTP");
29 xhr
.onreadystatechange = function () {
30 if (this.readyState
== num
) {
33 // Force evaluation for Opera
34 var response
= this.responseXML
;
41 if (finishedTests
== 4 && window
.testRunner
)
42 testRunner
.notifyDone();
45 xhr
.open("GET", "resources/1251.html", true);
50 if (window
.testRunner
) {
51 testRunner
.dumpAsText();
52 testRunner
.waitUntilDone();
55 var finishedTests
= 0;
57 for (i
= 1; i
< 5; i
++) {