Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / xmlhttprequest / xmlhttprequest-check-get-readystate-for-404-without-body.html
blob66a25718db6342d43fba38855060a867f5867cdd
1 <html>
2 <head>
3 <script type="text/javascript">
4 function loadXMLDoc() {
6 if (window.testRunner) {
7 testRunner.dumpAsText();
8 testRunner.waitUntilDone();
11 var res = "";
12 var xmlhttp = new XMLHttpRequest();
13 xmlhttp.onreadystatechange = function() {
14 if (xmlhttp.readyState) {
15 res = res + xmlhttp.readyState;
16 if(res == "124" && xmlhttp.status == 404) {
17 document.getElementById('result').innerText = "PASS";
19 if (window.testRunner)
20 testRunner.notifyDone();
25 xmlhttp.open("GET", "resources/status-404-without-body.php", true);
26 xmlhttp.send();
28 </script>
29 </head>
30 <body onload="loadXMLDoc()">
31 <p>This tests the readyState of a XMLHttpRequset which is sended with a "GET" method. And the response's status is 404 without body.</p>
32 <p id="result">FAIL</p>
33 </body>
34 </html>