Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(857)

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc

Issue 9581024: Added proper extensions for hosted documents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698