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

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

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 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 "chrome/browser/chromeos/drive/sync_client.h" 5 #include "chrome/browser/chromeos/drive/sync_client.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 void AddResourceIdToFetch(const std::string& resource_id) { 208 void AddResourceIdToFetch(const std::string& resource_id) {
209 sync_client_->AddResourceIdForTesting(SyncClient::FETCH, resource_id); 209 sync_client_->AddResourceIdForTesting(SyncClient::FETCH, resource_id);
210 } 210 }
211 211
212 // Adds a resource ID of a file to upload. 212 // Adds a resource ID of a file to upload.
213 void AddResourceIdToUpload(const std::string& resource_id) { 213 void AddResourceIdToUpload(const std::string& resource_id) {
214 sync_client_->AddResourceIdForTesting(SyncClient::UPLOAD, resource_id); 214 sync_client_->AddResourceIdForTesting(SyncClient::UPLOAD, resource_id);
215 } 215 }
216 216
217 protected: 217 protected:
218 MessageLoopForUI message_loop_; 218 base::MessageLoopForUI message_loop_;
219 content::TestBrowserThread ui_thread_; 219 content::TestBrowserThread ui_thread_;
220 base::ScopedTempDir temp_dir_; 220 base::ScopedTempDir temp_dir_;
221 scoped_ptr<StrictMock<MockFileSystem> > mock_file_system_; 221 scoped_ptr<StrictMock<MockFileSystem> > mock_file_system_;
222 scoped_ptr<FileCache, test_util::DestroyHelperForTests> cache_; 222 scoped_ptr<FileCache, test_util::DestroyHelperForTests> cache_;
223 scoped_ptr<SyncClient> sync_client_; 223 scoped_ptr<SyncClient> sync_client_;
224 }; 224 };
225 225
226 TEST_F(SyncClientTest, StartInitialScan) { 226 TEST_F(SyncClientTest, StartInitialScan) {
227 // Start processing the files in the backlog. This will collect the 227 // Start processing the files in the backlog. This will collect the
228 // resource IDs of these files. 228 // resource IDs of these files.
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 // IDs of pinned files, with stale local cache files. 294 // IDs of pinned files, with stale local cache files.
295 sync_client_->StartCheckingExistingPinnedFiles(); 295 sync_client_->StartCheckingExistingPinnedFiles();
296 296
297 SetExpectationForGetFileByResourceId("resource_id_fetched"); 297 SetExpectationForGetFileByResourceId("resource_id_fetched");
298 298
299 google_apis::test_util::RunBlockingPoolTask(); 299 google_apis::test_util::RunBlockingPoolTask();
300 } 300 }
301 301
302 } // namespace internal 302 } // namespace internal
303 } // namespace drive 303 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698