OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
8 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 2926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2937 | 2937 |
2938 TEST_F(DiskCacheBackendTest, BackendEviction) { | 2938 TEST_F(DiskCacheBackendTest, BackendEviction) { |
2939 BackendEviction(); | 2939 BackendEviction(); |
2940 } | 2940 } |
2941 | 2941 |
2942 TEST_F(DiskCacheBackendTest, MemoryOnlyBackendEviction) { | 2942 TEST_F(DiskCacheBackendTest, MemoryOnlyBackendEviction) { |
2943 SetMemoryOnlyMode(); | 2943 SetMemoryOnlyMode(); |
2944 BackendEviction(); | 2944 BackendEviction(); |
2945 } | 2945 } |
2946 | 2946 |
2947 // TODO(gavinp): Enable BackendEviction test for simple cache after performance | 2947 TEST_F(DiskCacheBackendTest, SimpleCacheBackendEviction) { |
2948 // problems are addressed. See crbug.com/588184 for more information. | 2948 SetSimpleCacheMode(); |
| 2949 BackendEviction(); |
| 2950 } |
2949 | 2951 |
2950 TEST_F(DiskCacheTest, Backend_UsageStatsTimer) { | 2952 TEST_F(DiskCacheTest, Backend_UsageStatsTimer) { |
2951 MessageLoopHelper helper; | 2953 MessageLoopHelper helper; |
2952 | 2954 |
2953 ASSERT_TRUE(CleanupCacheDir()); | 2955 ASSERT_TRUE(CleanupCacheDir()); |
2954 scoped_ptr<disk_cache::BackendImpl> cache; | 2956 scoped_ptr<disk_cache::BackendImpl> cache; |
2955 cache.reset(new disk_cache::BackendImpl( | 2957 cache.reset(new disk_cache::BackendImpl( |
2956 cache_path_, base::ThreadTaskRunnerHandle::Get(), NULL)); | 2958 cache_path_, base::ThreadTaskRunnerHandle::Get(), NULL)); |
2957 ASSERT_TRUE(NULL != cache.get()); | 2959 ASSERT_TRUE(NULL != cache.get()); |
2958 cache->SetUnitTestMode(); | 2960 cache->SetUnitTestMode(); |
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3703 // after closing. | 3705 // after closing. |
3704 // NOTE: IF THIS TEST IS FLAKY THEN IT IS FAILING. See https://crbug.com/416940 | 3706 // NOTE: IF THIS TEST IS FLAKY THEN IT IS FAILING. See https://crbug.com/416940 |
3705 TEST_F(DiskCacheBackendTest, SimpleCacheDeleteQuickly) { | 3707 TEST_F(DiskCacheBackendTest, SimpleCacheDeleteQuickly) { |
3706 SetSimpleCacheMode(); | 3708 SetSimpleCacheMode(); |
3707 for (int i = 0; i < 100; ++i) { | 3709 for (int i = 0; i < 100; ++i) { |
3708 InitCache(); | 3710 InitCache(); |
3709 cache_.reset(); | 3711 cache_.reset(); |
3710 EXPECT_TRUE(CleanupCacheDir()); | 3712 EXPECT_TRUE(CleanupCacheDir()); |
3711 } | 3713 } |
3712 } | 3714 } |
OLD | NEW |