| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "base/platform_thread.h" | 5 #include "base/platform_thread.h" |
| 6 #include "base/timer.h" | 6 #include "base/timer.h" |
| 7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
| 8 #include "net/base/net_errors.h" | 8 #include "net/base/net_errors.h" |
| 9 #include "net/disk_cache/disk_cache_test_base.h" | 9 #include "net/disk_cache/disk_cache_test_base.h" |
| 10 #include "net/disk_cache/disk_cache_test_util.h" | 10 #include "net/disk_cache/disk_cache_test_util.h" |
| 11 #include "net/disk_cache/entry_impl.h" | 11 #include "net/disk_cache/entry_impl.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 13 |
| 14 using base::Time; |
| 15 |
| 14 extern int g_cache_tests_max_id; | 16 extern int g_cache_tests_max_id; |
| 15 extern volatile int g_cache_tests_received; | 17 extern volatile int g_cache_tests_received; |
| 16 extern volatile bool g_cache_tests_error; | 18 extern volatile bool g_cache_tests_error; |
| 17 | 19 |
| 18 // Tests that can run with different types of caches. | 20 // Tests that can run with different types of caches. |
| 19 class DiskCacheEntryTest : public DiskCacheTestWithCache { | 21 class DiskCacheEntryTest : public DiskCacheTestWithCache { |
| 20 protected: | 22 protected: |
| 21 void InternalSyncIO(); | 23 void InternalSyncIO(); |
| 22 void InternalAsyncIO(); | 24 void InternalAsyncIO(); |
| 23 void ExternalSyncIO(); | 25 void ExternalSyncIO(); |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 InitCache(); | 746 InitCache(); |
| 745 DoomEntry(); | 747 DoomEntry(); |
| 746 } | 748 } |
| 747 | 749 |
| 748 TEST_F(DiskCacheEntryTest, MemoryOnlyDoomedEntry) { | 750 TEST_F(DiskCacheEntryTest, MemoryOnlyDoomedEntry) { |
| 749 SetMemoryOnlyMode(); | 751 SetMemoryOnlyMode(); |
| 750 InitCache(); | 752 InitCache(); |
| 751 DoomEntry(); | 753 DoomEntry(); |
| 752 } | 754 } |
| 753 | 755 |
| OLD | NEW |