OLD | NEW |
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_file_system.h" | 5 #include "chrome/browser/chromeos/drive/fake_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/file_system_util.h" | 9 #include "chrome/browser/chromeos/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 18 matching lines...) Expand all Loading... |
29 "chromeos/gdata/root_feed.json"); | 29 "chromeos/gdata/root_feed.json"); |
30 fake_drive_service_->LoadAccountMetadataForWapi( | 30 fake_drive_service_->LoadAccountMetadataForWapi( |
31 "chromeos/gdata/account_metadata.json"); | 31 "chromeos/gdata/account_metadata.json"); |
32 | 32 |
33 // Create a testee instance. | 33 // Create a testee instance. |
34 fake_file_system_.reset( | 34 fake_file_system_.reset( |
35 new FakeFileSystem(fake_drive_service_.get())); | 35 new FakeFileSystem(fake_drive_service_.get())); |
36 ASSERT_TRUE(fake_file_system_->InitializeForTesting()); | 36 ASSERT_TRUE(fake_file_system_->InitializeForTesting()); |
37 } | 37 } |
38 | 38 |
39 MessageLoopForUI message_loop_; | 39 base::MessageLoopForUI message_loop_; |
40 content::TestBrowserThread ui_thread_; | 40 content::TestBrowserThread ui_thread_; |
41 | 41 |
42 scoped_ptr<google_apis::FakeDriveService> fake_drive_service_; | 42 scoped_ptr<google_apis::FakeDriveService> fake_drive_service_; |
43 scoped_ptr<FakeFileSystem> fake_file_system_; | 43 scoped_ptr<FakeFileSystem> fake_file_system_; |
44 }; | 44 }; |
45 | 45 |
46 TEST_F(FakeFileSystemTest, GetResourceEntryById) { | 46 TEST_F(FakeFileSystemTest, GetResourceEntryById) { |
47 FileError error = FILE_ERROR_FAILED; | 47 FileError error = FILE_ERROR_FAILED; |
48 scoped_ptr<ResourceEntry> entry; | 48 scoped_ptr<ResourceEntry> entry; |
49 base::FilePath file_path; | 49 base::FilePath file_path; |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 util::GetDriveMyDriveRootPath().AppendASCII("Invalid File Name"), | 212 util::GetDriveMyDriveRootPath().AppendASCII("Invalid File Name"), |
213 google_apis::test_util::CreateCopyResultCallback(&error, &entry)); | 213 google_apis::test_util::CreateCopyResultCallback(&error, &entry)); |
214 google_apis::test_util::RunBlockingPoolTask(); | 214 google_apis::test_util::RunBlockingPoolTask(); |
215 | 215 |
216 ASSERT_EQ(FILE_ERROR_NOT_FOUND, error); | 216 ASSERT_EQ(FILE_ERROR_NOT_FOUND, error); |
217 ASSERT_FALSE(entry); | 217 ASSERT_FALSE(entry); |
218 } | 218 } |
219 | 219 |
220 } // namespace test_util | 220 } // namespace test_util |
221 } // namespace drive | 221 } // namespace drive |
OLD | NEW |