l-preflight-request-invalid-status.py?code=501");

      xhr.setRequestHeader("x-pass", "pass");

      xhr.onerror = test.step_func_done(function() {
        assert_equals(xhr.status, 0);
      });

      xhr.onload = test.unreached_func("Invalid 501 response to preflight should result in error.");

      xhr.send();
    }, "Request with 501 preflight response");
    </script>
  </body>
</html>
