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

Side by Side Diff: chrome/browser/chromeos/drive/file_system_unittest.cc

Issue 1042803002: Drive: Move inner structures of DriveAPIService under drive namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests. Created 5 years, 8 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
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 "chrome/browser/chromeos/drive/file_system.h" 5 #include "chrome/browser/chromeos/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 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 TEST_F(FileSystemTest, ReadDirectoryAfterUpdateWhileLoading) { 838 TEST_F(FileSystemTest, ReadDirectoryAfterUpdateWhileLoading) {
839 // Simulate the situation that full feed fetching takes very long time, 839 // Simulate the situation that full feed fetching takes very long time,
840 // to test the recursive "fast fetch" feature is properly working. 840 // to test the recursive "fast fetch" feature is properly working.
841 fake_drive_service_->set_never_return_all_file_list(true); 841 fake_drive_service_->set_never_return_all_file_list(true);
842 842
843 // On the fake server, create the test directory. 843 // On the fake server, create the test directory.
844 scoped_ptr<google_apis::FileResource> parent; 844 scoped_ptr<google_apis::FileResource> parent;
845 { 845 {
846 google_apis::DriveApiErrorCode error = google_apis::DRIVE_OTHER_ERROR; 846 google_apis::DriveApiErrorCode error = google_apis::DRIVE_OTHER_ERROR;
847 fake_drive_service_->AddNewDirectory( 847 fake_drive_service_->AddNewDirectory(
848 fake_drive_service_->GetRootResourceId(), 848 fake_drive_service_->GetRootResourceId(), "UpdateWhileLoadingTestDir",
849 "UpdateWhileLoadingTestDir", 849 AddNewDirectoryOptions(),
850 DriveServiceInterface::AddNewDirectoryOptions(),
851 google_apis::test_util::CreateCopyResultCallback(&error, &parent)); 850 google_apis::test_util::CreateCopyResultCallback(&error, &parent));
852 base::RunLoop().RunUntilIdle(); 851 base::RunLoop().RunUntilIdle();
853 ASSERT_EQ(google_apis::HTTP_CREATED, error); 852 ASSERT_EQ(google_apis::HTTP_CREATED, error);
854 } 853 }
855 854
856 // Fetch the directory. Currently it is empty. 855 // Fetch the directory. Currently it is empty.
857 scoped_ptr<ResourceEntryVector> before = ReadDirectorySync(base::FilePath( 856 scoped_ptr<ResourceEntryVector> before = ReadDirectorySync(base::FilePath(
858 FILE_PATH_LITERAL("drive/root/UpdateWhileLoadingTestDir"))); 857 FILE_PATH_LITERAL("drive/root/UpdateWhileLoadingTestDir")));
859 ASSERT_TRUE(before); 858 ASSERT_TRUE(before);
860 EXPECT_EQ(0u, before->size()); 859 EXPECT_EQ(0u, before->size());
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 google_apis::test_util::CreateCopyResultCallback(&available)); 1050 google_apis::test_util::CreateCopyResultCallback(&available));
1052 content::RunAllBlockingPoolTasksUntilIdle(); 1051 content::RunAllBlockingPoolTasksUntilIdle();
1053 ASSERT_FALSE(available); 1052 ASSERT_FALSE(available);
1054 1053
1055 entry = GetResourceEntrySync(file_in_root); 1054 entry = GetResourceEntrySync(file_in_root);
1056 ASSERT_TRUE(entry); 1055 ASSERT_TRUE(entry);
1057 EXPECT_FALSE(entry->file_specific_info().cache_state().is_present()); 1056 EXPECT_FALSE(entry->file_specific_info().cache_state().is_present());
1058 } 1057 }
1059 1058
1060 } // namespace drive 1059 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/file_system/search_operation_unittest.cc ('k') | chrome/browser/chromeos/drive/job_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698