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 <list> | 5 #include <list> |
6 #include <map> | 6 #include <map> |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "base/message_loop/message_loop_proxy.h" | 13 #include "base/message_loop/message_loop_proxy.h" |
14 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
15 #include "content/public/test/mock_storage_client.h" | 15 #include "content/public/test/mock_storage_client.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 #include "webkit/browser/quota/quota_manager.h" | 17 #include "storage/browser/quota/quota_manager.h" |
18 #include "webkit/browser/quota/quota_temporary_storage_evictor.h" | 18 #include "storage/browser/quota/quota_temporary_storage_evictor.h" |
19 | 19 |
20 using quota::QuotaTemporaryStorageEvictor; | 20 using quota::QuotaTemporaryStorageEvictor; |
21 using quota::StorageType; | 21 using quota::StorageType; |
22 using quota::UsageAndQuota; | 22 using quota::UsageAndQuota; |
23 | 23 |
24 namespace content { | 24 namespace content { |
25 | 25 |
26 class QuotaTemporaryStorageEvictorTest; | 26 class QuotaTemporaryStorageEvictorTest; |
27 | 27 |
28 namespace { | 28 namespace { |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 EXPECT_EQ(150 + 300, quota_eviction_handler()->GetUsage()); | 405 EXPECT_EQ(150 + 300, quota_eviction_handler()->GetUsage()); |
406 | 406 |
407 EXPECT_EQ(0, statistics().num_errors_on_evicting_origin); | 407 EXPECT_EQ(0, statistics().num_errors_on_evicting_origin); |
408 EXPECT_EQ(0, statistics().num_errors_on_getting_usage_and_quota); | 408 EXPECT_EQ(0, statistics().num_errors_on_getting_usage_and_quota); |
409 EXPECT_EQ(2, statistics().num_evicted_origins); | 409 EXPECT_EQ(2, statistics().num_evicted_origins); |
410 EXPECT_EQ(1, statistics().num_eviction_rounds); | 410 EXPECT_EQ(1, statistics().num_eviction_rounds); |
411 EXPECT_EQ(0, statistics().num_skipped_eviction_rounds); | 411 EXPECT_EQ(0, statistics().num_skipped_eviction_rounds); |
412 } | 412 } |
413 | 413 |
414 } // namespace content | 414 } // namespace content |
OLD | NEW |