OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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" | |
6 #include "base/files/file_path.h" | 5 #include "base/files/file_path.h" |
7 #include "base/strings/string_util.h" | 6 #include "base/strings/string_util.h" |
8 #include "net/disk_cache/blockfile/file_block.h" | 7 #include "net/disk_cache/blockfile/file_block.h" |
9 #include "net/disk_cache/blockfile/mapped_file.h" | 8 #include "net/disk_cache/blockfile/mapped_file.h" |
10 #include "net/disk_cache/disk_cache_test_base.h" | 9 #include "net/disk_cache/disk_cache_test_base.h" |
11 #include "net/disk_cache/disk_cache_test_util.h" | 10 #include "net/disk_cache/disk_cache_test_util.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
13 | 12 |
14 namespace { | 13 namespace { |
15 | 14 |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 if (!completed) | 131 if (!completed) |
133 expected++; | 132 expected++; |
134 | 133 |
135 helper.WaitUntilCacheIoFinished(expected); | 134 helper.WaitUntilCacheIoFinished(expected); |
136 | 135 |
137 EXPECT_EQ(expected, helper.callbacks_called()); | 136 EXPECT_EQ(expected, helper.callbacks_called()); |
138 EXPECT_FALSE(helper.callback_reused_error()); | 137 EXPECT_FALSE(helper.callback_reused_error()); |
139 EXPECT_STREQ(static_cast<char*>(file_block1.buffer()), | 138 EXPECT_STREQ(static_cast<char*>(file_block1.buffer()), |
140 static_cast<char*>(file_block2.buffer())); | 139 static_cast<char*>(file_block2.buffer())); |
141 } | 140 } |
OLD | NEW |