#include "net/http/http_cache_writers.h"
#include <limits>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "crypto/secure_hash.h"
#include "net/http/http_cache.h"
#include "net/http/http_cache_transaction.h"
#include "net/http/http_response_info.h"
#include "net/http/http_transaction.h"
#include "net/http/http_transaction_test_util.h"
#include "net/http/mock_http_cache.h"
#include "net/http/partial_data.h"
#include "net/test/gtest_util.h"
#include "net/test/test_with_task_environment.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
IsError;
IsOk;
namespace net {
namespace {
std::string GenerateCacheKey(const std::string& url) { … }
}
class WritersTest;
class TestHttpCacheTransaction : public HttpCache::Transaction { … };
class TestHttpCache : public HttpCache { … };
class WritersTest : public TestWithTaskEnvironment { … };
const int WritersTest::kDefaultBufferSize;
TEST_F(WritersTest, AddTransaction) { … }
TEST_F(WritersTest, AddManyTransactions) { … }
TEST_F(WritersTest, AddTransactionsExclusive) { … }
TEST_F(WritersTest, StopCachingMultipleWriters) { … }
TEST_F(WritersTest, StopCaching) { … }
TEST_F(WritersTest, MakeReaders) { … }
TEST_F(WritersTest, StopCachingMidReadKeepEntry) { … }
TEST_F(WritersTest, StopCachingMidReadDropEntry) { … }
TEST_F(WritersTest, RemoveIdleTransaction) { … }
TEST_F(WritersTest, Read) { … }
TEST_F(WritersTest, ReadMultiple) { … }
TEST_F(WritersTest, ReadMultipleDifferentBufferSizes) { … }
TEST_F(WritersTest, ReadMultipleDifferentBufferSizes1) { … }
TEST_F(WritersTest, ReadMultipleDeleteActiveTransaction) { … }
TEST_F(WritersTest, MidReadDeleteActiveTransaction) { … }
TEST_F(WritersTest, ReadMultipleDeleteWaitingTransaction) { … }
TEST_F(WritersTest, ReadMultipleDeleteIdleTransaction) { … }
TEST_F(WritersTest, ReadMultipleCacheWriteFailed) { … }
TEST_F(WritersTest, ReadMultipleNetworkReadFailed) { … }
TEST_F(WritersTest, GetLoadState) { … }
TEST_F(WritersTest, TruncateEntryFail) { … }
TEST_F(WritersTest, StopCachingWithKeepEntry) { … }
TEST_F(WritersTest, StopCachingWithNotKeepEntry) { … }
TEST_F(WritersTest, ContentEncodingShouldNotTruncate) { … }
}