script: Ensure EventSource interprets non-200 response codes as failure (#36853)

Spec has updated so that all responses that aren't 200 shall fail the
event source connection.

Testing: Covered by
`tests/wpt/tests/eventsource/request-status-error.window.js`

---------

Signed-off-by: Keith Yeung <kungfukeith11@gmail.com>
This commit is contained in:
Keith Yeung 2025-05-05 20:04:46 +08:00 committed by GitHub
parent b3980dc2ee
commit 3936b1d22b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 33 additions and 39 deletions

View file

@ -1,3 +0,0 @@
[eventsource-close.window.html]
[EventSource: close(), test events]
expected: FAIL

View file

@ -1,21 +0,0 @@
[request-status-error.window.html]
[EventSource: incorrect HTTP status code (204)]
expected: FAIL
[EventSource: incorrect HTTP status code (205)]
expected: FAIL
[EventSource: incorrect HTTP status code (210)]
expected: FAIL
[EventSource: incorrect HTTP status code (299)]
expected: FAIL
[EventSource: incorrect HTTP status code (404)]
expected: FAIL
[EventSource: incorrect HTTP status code (410)]
expected: FAIL
[EventSource: incorrect HTTP status code (503)]
expected: FAIL