The returned status code in different scenarios

   allowed  preflight  response  | status |
   -------  ---------  --------  | ------ |
 1      no          x       400  |      0 |
 2      no        200         x  |      0 |
 3     yes          x       400  |    400 |
 4     yes        200       400  |    400 |
 5     yes        400         x  |      0 |

Summary

Harness status: OK

Found 5 tests

Details

ResultTest NameMessage
Pass1. CORS disallowed, response status 400.
Asserts run
Pass
assert_equals(4, 4, "readyState")
    at Test.<anonymous> ( /cors/status.htm:50:17)
Pass
assert_equals(0, 0, "status")
    at Test.<anonymous> ( /cors/status.htm:51:17)
Pass2. CORS disallowed, preflight status 200.
Asserts run
Pass
assert_equals(4, 4, "readyState")
    at Test.<anonymous> ( /cors/status.htm:50:17)
Pass
assert_equals(0, 0, "status")
    at Test.<anonymous> ( /cors/status.htm:51:17)
Fail3. CORS allowed, response status 400.assert_unreached: error event Reached unreachable code
    at Test.<anonymous> (https://xn--n8j6ds53lwwkrqhv28a.wpt.live/cors/status.htm:48:21)
    at Test.step (https://xn--n8j6ds53lwwkrqhv28a.wpt.live/resources/testharness.js:2642:25)
    at XMLHttpRequest.<anonymous> (https://xn--n8j6ds53lwwkrqhv28a.wpt.live/resources/testharness.js:2689:35)
Asserts run
Fail
assert_unreached("error event")
    at Test.<anonymous> ( /cors/status.htm:48:21)
Fail4. CORS allowed, preflight status 200, response status 400.assert_unreached: error event Reached unreachable code
    at Test.<anonymous> (https://xn--n8j6ds53lwwkrqhv28a.wpt.live/cors/status.htm:48:21)
    at Test.step (https://xn--n8j6ds53lwwkrqhv28a.wpt.live/resources/testharness.js:2642:25)
    at XMLHttpRequest.<anonymous> (https://xn--n8j6ds53lwwkrqhv28a.wpt.live/resources/testharness.js:2689:35)
Asserts run
Fail
assert_unreached("error event")
    at Test.<anonymous> ( /cors/status.htm:48:21)
Pass5. CORS allowed, preflight status 400.
Asserts run
Pass
assert_equals(4, 4, "readyState")
    at Test.<anonymous> ( /cors/status.htm:50:17)
Pass
assert_equals(0, 0, "status")
    at Test.<anonymous> ( /cors/status.htm:51:17)