Add MultiRangeHttpFetcherOverFileFetcherTest to HttpFetcherTest.
When fetching a payload in DownloadAction, in addition to using
MultiRangeHttpFetcher over LibcurlHttpFetcher, we're also actively using
MultiRangeHttpFetcher over FileFetcher in Android, e.g. when installing
or verifying a local payload.
This CL adds MultiRangeHttpFetcherOverFileFetcherTest into
HttpFetcherTest to exercise this path. The test would be helpful in
capturing issues addressed by commit 028ea416 (it still requires running
with an ASAN build though).
It also fixes a bug in MultiRangeHttpFetcher::ReceivedBytes(), which is
uncovered while fixing the test.
Fixes: 120577143
Test: Run unittest on taimen.
Change-Id: I5dddb95e9bdfd842017876017a99c04d6be304db
2 files changed