test(network): fix response.body() navigation test on WebKit#41570
Conversation
|
|
||
| it('should give a readable error when response.body() races with navigation', async ({ page, server, browserName }) => { | ||
| it.skip(browserName === 'firefox', 'Firefox has a separate eviction error path'); | ||
| it.skip(browserName !== 'chromium', 'Only Chromium evicts the response body on navigation and throws; Firefox and WebKit keep it available'); |
There was a problem hiding this comment.
How come WebKit keeps it available? I don't think so!
There was a problem hiding this comment.
You're right, it doesn't. WebKit evicts and throws just like Chromium — the test was using EMPTY_PAGE, and WebKit returns an empty buffer for a zero-length body without hitting the eviction path, so it never threw. Switched to a page with a real body and now WebKit throws too; only Firefox actually keeps the body around.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
WebKit does evict the response body on navigation and throws, just like Chromium. The test only passed a zero-length body (EMPTY_PAGE), for which WebKit returns an empty buffer without hitting the eviction error path. Load a page with a real body instead, and keep skipping only Firefox, which genuinely keeps the body available after navigating away.
Test results for "MCP"2 failed 7459 passed, 1132 skipped Merge workflow run. |
Test results for "tests 1"1 failed 3 flaky49460 passed, 1164 skipped Merge workflow run. |
Follow up to #41527.
The added test failed on WebKit, but not because WebKit keeps the body after navigation — it evicts and throws just like Chromium. The test used
EMPTY_PAGE, and WebKit returns an empty buffer for a zero-length body without hitting the eviction error path, so it never threw.Load a page with a real body instead. Now it passes on WebKit too; only Firefox stays skipped, since it genuinely keeps the body available after navigating away.