| Index: content/browser/cache_storage/cache_storage_manager_unittest.cc
|
| diff --git a/content/browser/cache_storage/cache_storage_manager_unittest.cc b/content/browser/cache_storage/cache_storage_manager_unittest.cc
|
| index 825fada5673fee7d66b1333f48f8c3d1b00832a1..89decab4fbda8856472783f6b2cec7a755448010 100644
|
| --- a/content/browser/cache_storage/cache_storage_manager_unittest.cc
|
| +++ b/content/browser/cache_storage/cache_storage_manager_unittest.cc
|
| @@ -112,6 +112,8 @@ class CacheStorageManagerTest : public testing::Test {
|
|
|
| virtual bool MemoryOnly() { return false; }
|
|
|
| + virtual bool PadResources() const { return false; }
|
| +
|
| void BoolCallback(base::RunLoop* run_loop, bool value) {
|
| callback_bool_ = value;
|
| run_loop->Quit();
|
| @@ -504,10 +506,21 @@ class CacheStorageManagerMemoryOnlyTest : public CacheStorageManagerTest {
|
| bool MemoryOnly() override { return true; }
|
| };
|
|
|
| +enum class CacheLocation { IN_MEMORY, ON_DISK };
|
| +
|
| +enum class PadType { ADD_PADDING, NO_PADDING };
|
| +
|
| class CacheStorageManagerTestP : public CacheStorageManagerTest,
|
| - public testing::WithParamInterface<bool> {
|
| + public testing::WithParamInterface<
|
| + testing::tuple<CacheLocation, PadType>> {
|
| public:
|
| - bool MemoryOnly() override { return !GetParam(); }
|
| + bool MemoryOnly() override {
|
| + return testing::get<0>(GetParam()) == CacheLocation::IN_MEMORY;
|
| + }
|
| +
|
| + bool PadResources() const override {
|
| + return testing::get<1>(GetParam()) == PadType::ADD_PADDING;
|
| + }
|
| };
|
|
|
| TEST_F(CacheStorageManagerTest, TestsRunOnIOThread) {
|
| @@ -1408,9 +1421,17 @@ class CacheStorageQuotaClientDiskOnlyTest : public CacheStorageQuotaClientTest {
|
| bool MemoryOnly() override { return false; }
|
| };
|
|
|
| -class CacheStorageQuotaClientTestP : public CacheStorageQuotaClientTest,
|
| - public testing::WithParamInterface<bool> {
|
| - bool MemoryOnly() override { return !GetParam(); }
|
| +class CacheStorageQuotaClientTestP
|
| + : public CacheStorageQuotaClientTest,
|
| + public testing::WithParamInterface<
|
| + testing::tuple<CacheLocation, PadType>> {
|
| + bool MemoryOnly() override {
|
| + return testing::get<0>(GetParam()) == CacheLocation::IN_MEMORY;
|
| + }
|
| +
|
| + bool PadResources() const override {
|
| + return testing::get<1>(GetParam()) == PadType::ADD_PADDING;
|
| + }
|
| };
|
|
|
| TEST_P(CacheStorageQuotaClientTestP, QuotaID) {
|
| @@ -1500,12 +1521,18 @@ TEST_P(CacheStorageQuotaClientTestP, QuotaDoesSupport) {
|
| EXPECT_FALSE(QuotaDoesSupport(storage::kStorageTypeUnknown));
|
| }
|
|
|
| -INSTANTIATE_TEST_CASE_P(CacheStorageManagerTests,
|
| - CacheStorageManagerTestP,
|
| - ::testing::Values(false, true));
|
| +INSTANTIATE_TEST_CASE_P(
|
| + CacheStorageManagerTests,
|
| + CacheStorageManagerTestP,
|
| + ::testing::Combine(
|
| + ::testing::Values(CacheLocation::IN_MEMORY, CacheLocation::ON_DISK),
|
| + ::testing::Values(PadType::ADD_PADDING, PadType::NO_PADDING)));
|
|
|
| -INSTANTIATE_TEST_CASE_P(CacheStorageQuotaClientTests,
|
| - CacheStorageQuotaClientTestP,
|
| - ::testing::Values(false, true));
|
| +INSTANTIATE_TEST_CASE_P(
|
| + CacheStorageQuotaClientTests,
|
| + CacheStorageQuotaClientTestP,
|
| + ::testing::Combine(
|
| + ::testing::Values(CacheLocation::IN_MEMORY, CacheLocation::ON_DISK),
|
| + ::testing::Values(PadType::ADD_PADDING, PadType::NO_PADDING)));
|
|
|
| } // namespace content
|
|
|