3 <p>This tests the readyState of a XMLHttpRequset which is sent with a
"HEAD" method to a not exist resource.
</p>
4 <pre id=
"result">FAIL
</pre>
5 <script type=
"text/javascript">
7 if (window
.testRunner
) {
8 testRunner
.dumpAsText();
9 testRunner
.waitUntilDone();
13 var xmlhttp
= new XMLHttpRequest();
14 xmlhttp
.onreadystatechange = function() {
15 if (xmlhttp
.readyState
) {
16 res
= res
+ xmlhttp
.readyState
;
17 if(res
== "124" && xmlhttp
.status
== 404) {
18 document
.getElementById('result').innerText
= "PASS";
20 if (window
.testRunner
)
21 testRunner
.notifyDone();
26 xmlhttp
.open("HEAD","notExist.html",true);