| OLD | NEW |
| 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/drive_resource_metadata.h" | 5 #include "chrome/browser/chromeos/drive/drive_resource_metadata.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 EXPECT_TRUE(error == FILE_ERROR_OK || !entries); | 130 EXPECT_TRUE(error == FILE_ERROR_OK || !entries); |
| 131 return entries.Pass(); | 131 return entries.Pass(); |
| 132 } | 132 } |
| 133 | 133 |
| 134 base::ScopedTempDir temp_dir_; | 134 base::ScopedTempDir temp_dir_; |
| 135 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; | 135 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; |
| 136 scoped_ptr<DriveResourceMetadata, test_util::DestroyHelperForTests> | 136 scoped_ptr<DriveResourceMetadata, test_util::DestroyHelperForTests> |
| 137 resource_metadata_; | 137 resource_metadata_; |
| 138 | 138 |
| 139 private: | 139 private: |
| 140 MessageLoopForUI message_loop_; | 140 base::MessageLoopForUI message_loop_; |
| 141 content::TestBrowserThread ui_thread_; | 141 content::TestBrowserThread ui_thread_; |
| 142 }; | 142 }; |
| 143 | 143 |
| 144 // static | 144 // static |
| 145 void DriveResourceMetadataTest::Init(DriveResourceMetadata* resource_metadata) { | 145 void DriveResourceMetadataTest::Init(DriveResourceMetadata* resource_metadata) { |
| 146 FileError error = FILE_ERROR_FAILED; | 146 FileError error = FILE_ERROR_FAILED; |
| 147 resource_metadata->Initialize( | 147 resource_metadata->Initialize( |
| 148 google_apis::test_util::CreateCopyResultCallback(&error)); | 148 google_apis::test_util::CreateCopyResultCallback(&error)); |
| 149 google_apis::test_util::RunBlockingPoolTask(); | 149 google_apis::test_util::RunBlockingPoolTask(); |
| 150 ASSERT_EQ(FILE_ERROR_OK, error); | 150 ASSERT_EQ(FILE_ERROR_OK, error); |
| (...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1187 base::Bind(&CountFile, &count), | 1187 base::Bind(&CountFile, &count), |
| 1188 base::Bind(google_apis::test_util::CreateCopyResultCallback(&completed), | 1188 base::Bind(google_apis::test_util::CreateCopyResultCallback(&completed), |
| 1189 true)); | 1189 true)); |
| 1190 google_apis::test_util::RunBlockingPoolTask(); | 1190 google_apis::test_util::RunBlockingPoolTask(); |
| 1191 | 1191 |
| 1192 EXPECT_EQ(7, count); | 1192 EXPECT_EQ(7, count); |
| 1193 EXPECT_TRUE(completed); | 1193 EXPECT_TRUE(completed); |
| 1194 } | 1194 } |
| 1195 | 1195 |
| 1196 } // namespace drive | 1196 } // namespace drive |
| OLD | NEW |