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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/metrics/field_trial.h" | 7 #include "base/metrics/field_trial.h" |
8 #include "base/port.h" | 8 #include "base/port.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1601 Time middle_start = Time::Now(); | 1601 Time middle_start = Time::Now(); |
1602 | 1602 |
1603 ASSERT_EQ(net::OK, CreateEntry("second", &entry)); | 1603 ASSERT_EQ(net::OK, CreateEntry("second", &entry)); |
1604 entry->Close(); | 1604 entry->Close(); |
1605 ASSERT_EQ(net::OK, CreateEntry("third", &entry)); | 1605 ASSERT_EQ(net::OK, CreateEntry("third", &entry)); |
1606 entry->Close(); | 1606 entry->Close(); |
1607 FlushQueueForTest(); | 1607 FlushQueueForTest(); |
1608 | 1608 |
1609 AddDelay(); | 1609 AddDelay(); |
1610 Time middle_end = Time::Now(); | 1610 Time middle_end = Time::Now(); |
1611 AddDelay(); | |
1612 | 1611 |
1613 ASSERT_EQ(net::OK, CreateEntry("fourth", &entry)); | 1612 ASSERT_EQ(net::OK, CreateEntry("fourth", &entry)); |
1614 entry->Close(); | 1613 entry->Close(); |
1615 ASSERT_EQ(net::OK, OpenEntry("fourth", &entry)); | 1614 ASSERT_EQ(net::OK, OpenEntry("fourth", &entry)); |
1616 entry->Close(); | 1615 entry->Close(); |
1617 FlushQueueForTest(); | 1616 FlushQueueForTest(); |
1618 | 1617 |
1619 AddDelay(); | 1618 AddDelay(); |
1620 Time final = Time::Now(); | 1619 Time final = Time::Now(); |
1621 | 1620 |
(...skipping 1613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3235 SetSimpleCacheMode(); | 3234 SetSimpleCacheMode(); |
3236 SetMaxSize(0x100000); | 3235 SetMaxSize(0x100000); |
3237 BackendLoad(); | 3236 BackendLoad(); |
3238 } | 3237 } |
3239 | 3238 |
3240 TEST_F(DiskCacheBackendTest, SimpleDoomRecent) { | 3239 TEST_F(DiskCacheBackendTest, SimpleDoomRecent) { |
3241 SetSimpleCacheMode(); | 3240 SetSimpleCacheMode(); |
3242 BackendDoomRecent(); | 3241 BackendDoomRecent(); |
3243 } | 3242 } |
3244 | 3243 |
3245 TEST_F(DiskCacheBackendTest, SimpleDoomBetween) { | 3244 // crbug.com/330926, crbug.com/370677 |
| 3245 TEST_F(DiskCacheBackendTest, DISABLED_SimpleDoomBetween) { |
3246 SetSimpleCacheMode(); | 3246 SetSimpleCacheMode(); |
3247 BackendDoomBetween(); | 3247 BackendDoomBetween(); |
3248 } | 3248 } |
3249 | 3249 |
3250 TEST_F(DiskCacheBackendTest, SimpleCacheDoomAll) { | 3250 TEST_F(DiskCacheBackendTest, SimpleCacheDoomAll) { |
3251 SetSimpleCacheMode(); | 3251 SetSimpleCacheMode(); |
3252 BackendDoomAll(); | 3252 BackendDoomAll(); |
3253 } | 3253 } |
3254 | 3254 |
3255 TEST_F(DiskCacheBackendTest, SimpleCacheAppCacheOnlyDoomAll) { | 3255 TEST_F(DiskCacheBackendTest, SimpleCacheAppCacheOnlyDoomAll) { |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3500 void* iter = NULL; | 3500 void* iter = NULL; |
3501 size_t count = 0; | 3501 size_t count = 0; |
3502 ASSERT_TRUE(EnumerateAndMatchKeys(-1, &iter, &keys_to_match, &count)); | 3502 ASSERT_TRUE(EnumerateAndMatchKeys(-1, &iter, &keys_to_match, &count)); |
3503 cache_->EndEnumeration(&iter); | 3503 cache_->EndEnumeration(&iter); |
3504 | 3504 |
3505 EXPECT_EQ(key_pool.size(), count); | 3505 EXPECT_EQ(key_pool.size(), count); |
3506 EXPECT_TRUE(keys_to_match.empty()); | 3506 EXPECT_TRUE(keys_to_match.empty()); |
3507 } | 3507 } |
3508 | 3508 |
3509 #endif // defined(OS_POSIX) | 3509 #endif // defined(OS_POSIX) |
OLD | NEW |