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

Side by Side Diff: chrome/browser/extensions/api/file_system/file_system_apitest_chromeos.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/path_service.h" 5 #include "base/path_service.h"
6 #include "chrome/browser/apps/app_browsertest_util.h" 6 #include "chrome/browser/apps/app_browsertest_util.h"
7 #include "chrome/browser/chromeos/drive/drive_integration_service.h" 7 #include "chrome/browser/chromeos/drive/drive_integration_service.h"
8 #include "chrome/browser/chromeos/drive/file_system_interface.h" 8 #include "chrome/browser/chromeos/drive/file_system_interface.h"
9 #include "chrome/browser/chromeos/drive/file_system_util.h" 9 #include "chrome/browser/chromeos/drive/file_system_util.h"
10 #include "chrome/browser/chromeos/profiles/profile_helper.h" 10 #include "chrome/browser/chromeos/profiles/profile_helper.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 google_apis::test_util::CreateCopyResultCallback(&error, &entry)); 104 google_apis::test_util::CreateCopyResultCallback(&error, &entry));
105 content::RunAllPendingInMessageLoop(); 105 content::RunAllPendingInMessageLoop();
106 return error == google_apis::HTTP_CREATED && entry; 106 return error == google_apis::HTTP_CREATED && entry;
107 } 107 }
108 108
109 std::string AddTestDirectory(const std::string& title, 109 std::string AddTestDirectory(const std::string& title,
110 const std::string& parent_id) { 110 const std::string& parent_id) {
111 scoped_ptr<google_apis::FileResource> entry; 111 scoped_ptr<google_apis::FileResource> entry;
112 google_apis::DriveApiErrorCode error = google_apis::DRIVE_OTHER_ERROR; 112 google_apis::DriveApiErrorCode error = google_apis::DRIVE_OTHER_ERROR;
113 fake_drive_service_->AddNewDirectory( 113 fake_drive_service_->AddNewDirectory(
114 parent_id, title, 114 parent_id, title, drive::AddNewDirectoryOptions(),
115 drive::DriveServiceInterface::AddNewDirectoryOptions(),
116 google_apis::test_util::CreateCopyResultCallback(&error, &entry)); 115 google_apis::test_util::CreateCopyResultCallback(&error, &entry));
117 content::RunAllPendingInMessageLoop(); 116 content::RunAllPendingInMessageLoop();
118 return error == google_apis::HTTP_CREATED && entry ? entry->file_id() : ""; 117 return error == google_apis::HTTP_CREATED && entry ? entry->file_id() : "";
119 } 118 }
120 119
121 base::ScopedTempDir test_cache_root_; 120 base::ScopedTempDir test_cache_root_;
122 drive::FakeDriveService* fake_drive_service_; 121 drive::FakeDriveService* fake_drive_service_;
123 drive::DriveIntegrationService* integration_service_; 122 drive::DriveIntegrationService* integration_service_;
124 drive::DriveIntegrationServiceFactory::FactoryCallback 123 drive::DriveIntegrationServiceFactory::FactoryCallback
125 create_drive_integration_service_; 124 create_drive_integration_service_;
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 FileSystemApiSaveExistingFileWithWriteTest) { 254 FileSystemApiSaveExistingFileWithWriteTest) {
256 base::FilePath test_file = drive::util::GetDriveMountPointPath( 255 base::FilePath test_file = drive::util::GetDriveMountPointPath(
257 browser()->profile()).AppendASCII("root/save_existing.txt"); 256 browser()->profile()).AppendASCII("root/save_existing.txt");
258 FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest( 257 FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
259 &test_file); 258 &test_file);
260 ASSERT_TRUE(RunPlatformAppTest( 259 ASSERT_TRUE(RunPlatformAppTest(
261 "api_test/file_system/save_existing_with_write")) << message_; 260 "api_test/file_system/save_existing_with_write")) << message_;
262 } 261 }
263 262
264 } // namespace extensions 263 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/drive/test_util.cc ('k') | chrome/browser/sync_file_system/drive_backend/drive_service_on_worker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698