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

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

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/fake_drive_file_system.h" 5 #include "chrome/browser/chromeos/drive/fake_drive_file_system.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/browser/chromeos/drive/drive_file_system_util.h" 9 #include "chrome/browser/chromeos/drive/drive_file_system_util.h"
10 #include "chrome/browser/google_apis/fake_drive_service.h" 10 #include "chrome/browser/google_apis/fake_drive_service.h"
(...skipping 19 matching lines...) Expand all
30 fake_drive_service_->LoadAccountMetadataForWapi( 30 fake_drive_service_->LoadAccountMetadataForWapi(
31 "chromeos/gdata/account_metadata.json"); 31 "chromeos/gdata/account_metadata.json");
32 fake_drive_service_->LoadAppListForDriveApi("chromeos/drive/applist.json"); 32 fake_drive_service_->LoadAppListForDriveApi("chromeos/drive/applist.json");
33 33
34 // Create a testee instance. 34 // Create a testee instance.
35 fake_drive_file_system_.reset( 35 fake_drive_file_system_.reset(
36 new FakeDriveFileSystem(fake_drive_service_.get())); 36 new FakeDriveFileSystem(fake_drive_service_.get()));
37 ASSERT_TRUE(fake_drive_file_system_->InitializeForTesting()); 37 ASSERT_TRUE(fake_drive_file_system_->InitializeForTesting());
38 } 38 }
39 39
40 MessageLoopForUI message_loop_; 40 base::MessageLoopForUI message_loop_;
41 // The order of the test threads is important, do not change the order. 41 // The order of the test threads is important, do not change the order.
42 // See also content/browser/browser_thread_impl.cc. 42 // See also content/browser/browser_thread_impl.cc.
43 content::TestBrowserThread ui_thread_; 43 content::TestBrowserThread ui_thread_;
44 44
45 scoped_ptr<google_apis::FakeDriveService> fake_drive_service_; 45 scoped_ptr<google_apis::FakeDriveService> fake_drive_service_;
46 scoped_ptr<FakeDriveFileSystem> fake_drive_file_system_; 46 scoped_ptr<FakeDriveFileSystem> fake_drive_file_system_;
47 }; 47 };
48 48
49 TEST_F(FakeDriveFileSystemTest, GetEntryInfoByResourceId) { 49 TEST_F(FakeDriveFileSystemTest, GetEntryInfoByResourceId) {
50 FileError error = FILE_ERROR_FAILED; 50 FileError error = FILE_ERROR_FAILED;
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 util::GetDriveMyDriveRootPath().AppendASCII("Invalid File Name"), 213 util::GetDriveMyDriveRootPath().AppendASCII("Invalid File Name"),
214 google_apis::test_util::CreateCopyResultCallback(&error, &entry)); 214 google_apis::test_util::CreateCopyResultCallback(&error, &entry));
215 google_apis::test_util::RunBlockingPoolTask(); 215 google_apis::test_util::RunBlockingPoolTask();
216 216
217 ASSERT_EQ(FILE_ERROR_NOT_FOUND, error); 217 ASSERT_EQ(FILE_ERROR_NOT_FOUND, error);
218 ASSERT_FALSE(entry); 218 ASSERT_FALSE(entry);
219 } 219 }
220 220
221 } // namespace test_util 221 } // namespace test_util
222 } // namespace drive 222 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698