Bug 1814645 [wpt PR 38326] - Remove NOTREACHED in HttpCache::Transaction, a=testonly
commit62de5bf4584c8c435a0fce30bf57055deeef6818
authorAdam Rice <ricea@chromium.org>
Sat, 4 Feb 2023 09:19:22 +0000 (4 09:19 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Sat, 4 Feb 2023 20:24:55 +0000 (4 20:24 +0000)
tree2094303997f68b7e21742be6e3d3846511890c70
parente11f9580cb82904a8dc598eeaf38ed01b9bdad9f
Bug 1814645 [wpt PR 38326] - Remove NOTREACHED in HttpCache::Transaction, a=testonly

Automatic update from web-platform-tests
Remove NOTREACHED in HttpCache::Transaction

net::HttpCache::Transaction::BeginCacheRead had a NOTREACHED() statement
which is reached if a range request is sent with "only-if-cached" as the
cache mode.

Remove the NOTREACHED() and permit the fallthrough behaviour of
returning ERR_CACHE_MISS to happen instead.

Add unit and web-platform tests for this case. The wpt fails because it
expects the fetch to succeed, whereas our implementation returns
ERR_CACHE_MISS.

BUG=1408233

Change-Id: I1023712b1a0d3642e6c980dd12dba81440d4fc13
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4218212
Reviewed-by: Nidhi Jaju <nidhijaju@chromium.org>
Commit-Queue: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1100870}

--

wpt-commits: 2a56800ad1b8040dfbf75f23a7ba5042e982a925
wpt-pr: 38326
testing/web-platform/tests/fetch/http-cache/partial.any.js