| 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 "chrome/browser/chromeos/drive/drive_file_system.h" | 5 #include "chrome/browser/chromeos/drive/drive_file_system.h" | 
| 6 | 6 | 
| 7 #include <string> | 7 #include <string> | 
| 8 #include <vector> | 8 #include <vector> | 
| 9 | 9 | 
| 10 #include "base/bind.h" | 10 #include "base/bind.h" | 
| (...skipping 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1180   TestLoadMetadataFromCache(); | 1180   TestLoadMetadataFromCache(); | 
| 1181 | 1181 | 
| 1182   EXPECT_TRUE(EntryExists(FilePath(FILE_PATH_LITERAL("drive/File1")))); | 1182   EXPECT_TRUE(EntryExists(FilePath(FILE_PATH_LITERAL("drive/File1")))); | 
| 1183   EXPECT_TRUE(EntryExists(FilePath(FILE_PATH_LITERAL("drive/Dir1")))); | 1183   EXPECT_TRUE(EntryExists(FilePath(FILE_PATH_LITERAL("drive/Dir1")))); | 
| 1184   EXPECT_TRUE(EntryExists(FilePath(FILE_PATH_LITERAL("drive/Dir1/File2")))); | 1184   EXPECT_TRUE(EntryExists(FilePath(FILE_PATH_LITERAL("drive/Dir1/File2")))); | 
| 1185   EXPECT_TRUE(EntryExists(FilePath(FILE_PATH_LITERAL("drive/Dir1/SubDir2")))); | 1185   EXPECT_TRUE(EntryExists(FilePath(FILE_PATH_LITERAL("drive/Dir1/SubDir2")))); | 
| 1186   EXPECT_TRUE(EntryExists( | 1186   EXPECT_TRUE(EntryExists( | 
| 1187       FilePath(FILE_PATH_LITERAL("drive/Dir1/SubDir2/File3")))); | 1187       FilePath(FILE_PATH_LITERAL("drive/Dir1/SubDir2/File3")))); | 
| 1188 } | 1188 } | 
| 1189 | 1189 | 
| 1190 TEST_F(DriveFileSystemTest, CachedFeadLoadingThenServerFeedLoading) { | 1190 TEST_F(DriveFileSystemTest, CachedFeedLoadingThenServerFeedLoading) { | 
| 1191   SaveTestFileSystem(USE_SERVER_TIMESTAMP); | 1191   SaveTestFileSystem(USE_SERVER_TIMESTAMP); | 
| 1192 | 1192 | 
| 1193   // SaveTestFileSystem and "account_metadata.json" have the same changestamp, | 1193   // SaveTestFileSystem and "account_metadata.json" have the same changestamp, | 
| 1194   // so no request for new feeds (i.e., call to GetDocuments) should happen. | 1194   // so no request for new feeds (i.e., call to GetDocuments) should happen. | 
| 1195   mock_drive_service_->set_account_metadata( | 1195   mock_drive_service_->set_account_metadata( | 
| 1196       google_apis::test_util::LoadJSONFile( | 1196       google_apis::test_util::LoadJSONFile( | 
| 1197           "gdata/account_metadata.json").release()); | 1197           "gdata/account_metadata.json").release()); | 
| 1198   EXPECT_CALL(*mock_drive_service_, GetAccountMetadata(_)).Times(1); | 1198   EXPECT_CALL(*mock_drive_service_, GetAccountMetadata(_)).Times(1); | 
| 1199   EXPECT_CALL(*mock_webapps_registry_, UpdateFromFeed(_)).Times(1); | 1199   EXPECT_CALL(*mock_webapps_registry_, UpdateFromFeed(_)).Times(1); | 
| 1200   EXPECT_CALL(*mock_drive_service_, GetDocuments(_, _, _, _, _)).Times(0); | 1200   EXPECT_CALL(*mock_drive_service_, GetDocuments(_, _, _, _, _)).Times(0); | 
| (...skipping 1466 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2667 | 2667 | 
| 2668   // Try to close the same file twice. | 2668   // Try to close the same file twice. | 
| 2669   file_system_->CloseFile(kFileInRoot, close_file_callback); | 2669   file_system_->CloseFile(kFileInRoot, close_file_callback); | 
| 2670   message_loop_.Run(); | 2670   message_loop_.Run(); | 
| 2671 | 2671 | 
| 2672   // It must fail. | 2672   // It must fail. | 
| 2673   EXPECT_EQ(DRIVE_FILE_ERROR_NOT_FOUND, callback_helper_->last_error_); | 2673   EXPECT_EQ(DRIVE_FILE_ERROR_NOT_FOUND, callback_helper_->last_error_); | 
| 2674 } | 2674 } | 
| 2675 | 2675 | 
| 2676 }   // namespace drive | 2676 }   // namespace drive | 
| OLD | NEW | 
|---|