| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include <list> | 7 #include <list> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| 11 | 11 |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/callback.h" | 13 #include "base/callback.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 16 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
| 17 #include "content/public/test/mock_storage_client.h" | |
| 18 #include "storage/browser/quota/quota_manager.h" | 17 #include "storage/browser/quota/quota_manager.h" |
| 19 #include "storage/browser/quota/quota_temporary_storage_evictor.h" | 18 #include "storage/browser/quota/quota_temporary_storage_evictor.h" |
| 19 #include "storage/browser/test/mock_storage_client.h" |
| 20 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
| 21 | 21 |
| 22 using storage::QuotaTemporaryStorageEvictor; | 22 using storage::QuotaTemporaryStorageEvictor; |
| 23 using storage::StorageType; | 23 using storage::StorageType; |
| 24 using storage::UsageAndQuota; | 24 using storage::UsageAndQuota; |
| 25 | 25 |
| 26 namespace content { | 26 namespace content { |
| 27 | 27 |
| 28 class QuotaTemporaryStorageEvictorTest; | 28 class QuotaTemporaryStorageEvictorTest; |
| 29 | 29 |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 EXPECT_EQ(150 + 300, quota_eviction_handler()->GetUsage()); | 410 EXPECT_EQ(150 + 300, quota_eviction_handler()->GetUsage()); |
| 411 | 411 |
| 412 EXPECT_EQ(0, statistics().num_errors_on_evicting_origin); | 412 EXPECT_EQ(0, statistics().num_errors_on_evicting_origin); |
| 413 EXPECT_EQ(0, statistics().num_errors_on_getting_usage_and_quota); | 413 EXPECT_EQ(0, statistics().num_errors_on_getting_usage_and_quota); |
| 414 EXPECT_EQ(2, statistics().num_evicted_origins); | 414 EXPECT_EQ(2, statistics().num_evicted_origins); |
| 415 EXPECT_EQ(1, statistics().num_eviction_rounds); | 415 EXPECT_EQ(1, statistics().num_eviction_rounds); |
| 416 EXPECT_EQ(0, statistics().num_skipped_eviction_rounds); | 416 EXPECT_EQ(0, statistics().num_skipped_eviction_rounds); |
| 417 } | 417 } |
| 418 | 418 |
| 419 } // namespace content | 419 } // namespace content |
| OLD | NEW |