| 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/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
| 7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
| 8 #include "base/platform_thread.h" | 8 #include "base/platform_thread.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "net/base/io_buffer.h" | 10 #include "net/base/io_buffer.h" |
| (...skipping 1395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1406 } | 1406 } |
| 1407 | 1407 |
| 1408 TEST_F(DiskCacheBackendTest, DisableSuccess4) { | 1408 TEST_F(DiskCacheBackendTest, DisableSuccess4) { |
| 1409 ASSERT_TRUE(CopyTestCache(L"bad_rankings")); | 1409 ASSERT_TRUE(CopyTestCache(L"bad_rankings")); |
| 1410 DisableFirstCleanup(); | 1410 DisableFirstCleanup(); |
| 1411 SetDirectMode(); | 1411 SetDirectMode(); |
| 1412 InitCache(); | 1412 InitCache(); |
| 1413 BackendDisable4(); | 1413 BackendDisable4(); |
| 1414 } | 1414 } |
| 1415 | 1415 |
| 1416 // Flaky, http://crbug.com/21110. Don't re-enable without a real fix or adding | 1416 // Flaky, http://crbug.com/21110. |
| 1417 // more debugging info! | 1417 // TODO(rvargas): Add more debugging code to help identify the root cause. |
| 1418 TEST_F(DiskCacheBackendTest, DISABLED_NewEvictionDisableSuccess4) { | 1418 TEST_F(DiskCacheBackendTest, FLAKY_NewEvictionDisableSuccess4) { |
| 1419 ASSERT_TRUE(CopyTestCache(L"bad_rankings")); | 1419 ASSERT_TRUE(CopyTestCache(L"bad_rankings")); |
| 1420 DisableFirstCleanup(); | 1420 DisableFirstCleanup(); |
| 1421 SetDirectMode(); | 1421 SetDirectMode(); |
| 1422 SetNewEviction(); | 1422 SetNewEviction(); |
| 1423 InitCache(); | 1423 InitCache(); |
| 1424 BackendDisable4(); | 1424 BackendDisable4(); |
| 1425 } | 1425 } |
| 1426 | 1426 |
| 1427 TEST_F(DiskCacheTest, Backend_UsageStats) { | 1427 TEST_F(DiskCacheTest, Backend_UsageStats) { |
| 1428 MessageLoopHelper helper; | 1428 MessageLoopHelper helper; |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1571 EXPECT_EQ(kDefaultSize * 5 / 2, | 1571 EXPECT_EQ(kDefaultSize * 5 / 2, |
| 1572 disk_cache::PreferedCacheSize(large_size * 100 / 2)); | 1572 disk_cache::PreferedCacheSize(large_size * 100 / 2)); |
| 1573 EXPECT_EQ(kDefaultSize * 5 / 2, | 1573 EXPECT_EQ(kDefaultSize * 5 / 2, |
| 1574 disk_cache::PreferedCacheSize(large_size * 500 / 2)); | 1574 disk_cache::PreferedCacheSize(large_size * 500 / 2)); |
| 1575 | 1575 |
| 1576 EXPECT_EQ(kDefaultSize * 6 / 2, | 1576 EXPECT_EQ(kDefaultSize * 6 / 2, |
| 1577 disk_cache::PreferedCacheSize(large_size * 600 / 2)); | 1577 disk_cache::PreferedCacheSize(large_size * 600 / 2)); |
| 1578 EXPECT_EQ(kDefaultSize * 7 / 2, | 1578 EXPECT_EQ(kDefaultSize * 7 / 2, |
| 1579 disk_cache::PreferedCacheSize(large_size * 700 / 2)); | 1579 disk_cache::PreferedCacheSize(large_size * 700 / 2)); |
| 1580 } | 1580 } |
| OLD | NEW |