| 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/bind.h" | 6 #include "base/bind.h" |
| 7 #include "base/bind_helpers.h" | 7 #include "base/bind_helpers.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.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" |
| 11 #include "base/threading/platform_thread.h" | 11 #include "base/threading/platform_thread.h" |
| 12 #include "base/timer/timer.h" | 12 #include "base/timer/timer.h" |
| 13 #include "net/base/completion_callback.h" | 13 #include "net/base/completion_callback.h" |
| 14 #include "net/base/io_buffer.h" | 14 #include "net/base/io_buffer.h" |
| 15 #include "net/base/net_errors.h" | 15 #include "net/base/net_errors.h" |
| 16 #include "net/base/test_completion_callback.h" | 16 #include "net/base/test_completion_callback.h" |
| 17 #include "net/disk_cache/backend_impl.h" | 17 #include "net/disk_cache/blockfile/backend_impl.h" |
| 18 #include "net/disk_cache/blockfile/entry_impl.h" |
| 18 #include "net/disk_cache/disk_cache_test_base.h" | 19 #include "net/disk_cache/disk_cache_test_base.h" |
| 19 #include "net/disk_cache/disk_cache_test_util.h" | 20 #include "net/disk_cache/disk_cache_test_util.h" |
| 20 #include "net/disk_cache/entry_impl.h" | 21 #include "net/disk_cache/memory/mem_entry_impl.h" |
| 21 #include "net/disk_cache/mem_entry_impl.h" | |
| 22 #include "net/disk_cache/simple/simple_entry_format.h" | 22 #include "net/disk_cache/simple/simple_entry_format.h" |
| 23 #include "net/disk_cache/simple/simple_entry_impl.h" | 23 #include "net/disk_cache/simple/simple_entry_impl.h" |
| 24 #include "net/disk_cache/simple/simple_synchronous_entry.h" | 24 #include "net/disk_cache/simple/simple_synchronous_entry.h" |
| 25 #include "net/disk_cache/simple/simple_test_util.h" | 25 #include "net/disk_cache/simple/simple_test_util.h" |
| 26 #include "net/disk_cache/simple/simple_util.h" | 26 #include "net/disk_cache/simple/simple_util.h" |
| 27 #include "testing/gtest/include/gtest/gtest.h" | 27 #include "testing/gtest/include/gtest/gtest.h" |
| 28 | 28 |
| 29 using base::Time; | 29 using base::Time; |
| 30 using disk_cache::ScopedEntryPtr; | 30 using disk_cache::ScopedEntryPtr; |
| 31 | 31 |
| (...skipping 3934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3966 EXPECT_EQ(kSize, callback.GetResult(ret)); | 3966 EXPECT_EQ(kSize, callback.GetResult(ret)); |
| 3967 | 3967 |
| 3968 // Make sure the first range was removed when the second was written. | 3968 // Make sure the first range was removed when the second was written. |
| 3969 ret = entry->ReadSparseData(0, buffer, kSize, callback.callback()); | 3969 ret = entry->ReadSparseData(0, buffer, kSize, callback.callback()); |
| 3970 EXPECT_EQ(0, callback.GetResult(ret)); | 3970 EXPECT_EQ(0, callback.GetResult(ret)); |
| 3971 | 3971 |
| 3972 entry->Close(); | 3972 entry->Close(); |
| 3973 } | 3973 } |
| 3974 | 3974 |
| 3975 #endif // defined(OS_POSIX) | 3975 #endif // defined(OS_POSIX) |
| OLD | NEW |