1 <p>This test checks that no exception is raised when getting a
404 HTTP response - that's success from XHR point of view.
</p>
4 <pre id=
"console"></pre>
9 document
.getElementById("console").appendChild(document
.createTextNode(s
+ "\n"));
12 function logProperty(object
, propertyName
)
16 property
= object
[propertyName
];
17 if (propertyName
== "responseText")
18 property
= (property
&& property
.length
) ? "Non-empty" : property
;
22 log(propertyName
+ ": " + property
+ " (" + typeof property
+ ")");
25 function sendRequest()
27 var request
= new XMLHttpRequest();
28 request
.open("GET", "resources/doesnotexist", false);
33 if (window
.testRunner
)
34 testRunner
.dumpAsText();
37 var request
= sendRequest();
47 log("PASS: No exception.");
48 for (var i
= 0; i
< properties
.length
; i
++) //>
49 logProperty(request
, properties
[i
]);
51 log("FAIL: Caught exception " + e
+ ".");