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 <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/json/json_file_value_serializer.h" | 10 #include "base/json/json_file_value_serializer.h" |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 new MockFindFileDelegate(); | 213 new MockFindFileDelegate(); |
214 | 214 |
215 EXPECT_CALL(*mock_find_file_delegate.get(), | 215 EXPECT_CALL(*mock_find_file_delegate.get(), |
216 OnEnterDirectory(FilePath(FILE_PATH_LITERAL("gdata")), _)) | 216 OnEnterDirectory(FilePath(FILE_PATH_LITERAL("gdata")), _)) |
217 .Times(1) | 217 .Times(1) |
218 .WillOnce(Return(FindFileDelegate::FIND_FILE_CONTINUES)); | 218 .WillOnce(Return(FindFileDelegate::FIND_FILE_CONTINUES)); |
219 EXPECT_CALL(*mock_find_file_delegate.get(), OnFileFound(_)) | 219 EXPECT_CALL(*mock_find_file_delegate.get(), OnFileFound(_)) |
220 .Times(1); | 220 .Times(1); |
221 | 221 |
222 file_system_->FindFileByPath( | 222 file_system_->FindFileByPath( |
223 FilePath(FILE_PATH_LITERAL("gdata/Document 1.gdocument")), | 223 FilePath(FILE_PATH_LITERAL("gdata/Document 1.gdoc")), |
224 mock_find_file_delegate); | 224 mock_find_file_delegate); |
225 } | 225 } |
226 | 226 |
227 TEST_F(GDataFileSystemTest, SearchDuplicateNames) { | 227 TEST_F(GDataFileSystemTest, SearchDuplicateNames) { |
228 LoadRootFeedDocument("root_feed.json"); | 228 LoadRootFeedDocument("root_feed.json"); |
229 | 229 |
230 scoped_refptr<MockFindFileDelegate> mock_find_file_delegate = | 230 scoped_refptr<MockFindFileDelegate> mock_find_file_delegate = |
231 new MockFindFileDelegate(); | 231 new MockFindFileDelegate(); |
232 EXPECT_CALL(*mock_find_file_delegate.get(), | 232 EXPECT_CALL(*mock_find_file_delegate.get(), |
233 OnEnterDirectory(FilePath(FILE_PATH_LITERAL("gdata")), _)) | 233 OnEnterDirectory(FilePath(FILE_PATH_LITERAL("gdata")), _)) |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 // Existing folder. | 447 // Existing folder. |
448 EXPECT_EQ( | 448 EXPECT_EQ( |
449 GDataFileSystem::DIRECTORY_ALREADY_PRESENT, | 449 GDataFileSystem::DIRECTORY_ALREADY_PRESENT, |
450 file_system_->FindFirstMissingParentDirectory( | 450 file_system_->FindFirstMissingParentDirectory( |
451 FilePath(FILE_PATH_LITERAL("gdata/Directory 1")), | 451 FilePath(FILE_PATH_LITERAL("gdata/Directory 1")), |
452 &last_dir_content_url, | 452 &last_dir_content_url, |
453 &first_missing_parent_path)); | 453 &first_missing_parent_path)); |
454 } | 454 } |
455 | 455 |
456 } // namespace gdata | 456 } // namespace gdata |
OLD | NEW |