chromium/third_party/blink/web_tests/http/tests/xmlhttprequest/xmlhttprequest-check-get-readystate-for-404-without-body.html

<html>
<head>
<script type="text/javascript">
function loadXMLDoc() {

    if (window.testRunner) {
        testRunner.dumpAsText();
        testRunner.waitUntilDone();
    }

    var res = "";
    var xmlhttp = new XMLHttpRequest();
    xmlhttp.onreadystatechange = function() {
        if (xmlhttp.readyState) {
            res = res + xmlhttp.readyState;
            if(res == "124" && xmlhttp.status == 404) {
                document.getElementById('result').innerText = "PASS";

                if (window.testRunner)
                    testRunner.notifyDone();
            }
        }
    }

    xmlhttp.open("GET", "resources/status-404-without-body.php", true);
    xmlhttp.send();
}
</script>
</head>
<body onload="loadXMLDoc()">
<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>
<p id="result">FAIL</p>
</body>
</html>