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 <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 | 185 |
186 class MockDriveWebAppsRegistry : public DriveWebAppsRegistryInterface { | 186 class MockDriveWebAppsRegistry : public DriveWebAppsRegistryInterface { |
187 public: | 187 public: |
188 virtual ~MockDriveWebAppsRegistry() {} | 188 virtual ~MockDriveWebAppsRegistry() {} |
189 | 189 |
190 MOCK_METHOD3(GetWebAppsForFile, void(const FilePath& file, | 190 MOCK_METHOD3(GetWebAppsForFile, void(const FilePath& file, |
191 const std::string& mime_type, | 191 const std::string& mime_type, |
192 ScopedVector<DriveWebAppInfo>* apps)); | 192 ScopedVector<DriveWebAppInfo>* apps)); |
193 MOCK_METHOD1(GetExtensionsForWebStoreApp, | 193 MOCK_METHOD1(GetExtensionsForWebStoreApp, |
194 std::set<std::string>(const std::string& web_store_id)); | 194 std::set<std::string>(const std::string& web_store_id)); |
195 MOCK_METHOD1(UpdateFromFeed, void(AccountMetadataFeed* metadata)); | 195 MOCK_METHOD1(UpdateFromFeed, void(const AccountMetadataFeed* metadata)); |
| 196 MOCK_METHOD1(UpdateFromApplicationList, void(const AppList* applist)); |
196 }; | 197 }; |
197 | 198 |
198 class GDataFileSystemTest : public testing::Test { | 199 class GDataFileSystemTest : public testing::Test { |
199 protected: | 200 protected: |
200 GDataFileSystemTest() | 201 GDataFileSystemTest() |
201 : ui_thread_(content::BrowserThread::UI, &message_loop_), | 202 : ui_thread_(content::BrowserThread::UI, &message_loop_), |
202 io_thread_(content::BrowserThread::IO), | 203 io_thread_(content::BrowserThread::IO), |
203 cache_(NULL), | 204 cache_(NULL), |
204 file_system_(NULL), | 205 file_system_(NULL), |
205 mock_doc_service_(NULL), | 206 mock_doc_service_(NULL), |
(...skipping 2412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2618 | 2619 |
2619 // Try to close the same file twice. | 2620 // Try to close the same file twice. |
2620 file_system_->CloseFile(kFileInRoot, close_file_callback); | 2621 file_system_->CloseFile(kFileInRoot, close_file_callback); |
2621 message_loop_.Run(); | 2622 message_loop_.Run(); |
2622 | 2623 |
2623 // It must fail. | 2624 // It must fail. |
2624 EXPECT_EQ(GDATA_FILE_ERROR_NOT_FOUND, callback_helper_->last_error_); | 2625 EXPECT_EQ(GDATA_FILE_ERROR_NOT_FOUND, callback_helper_->last_error_); |
2625 } | 2626 } |
2626 | 2627 |
2627 } // namespace gdata | 2628 } // namespace gdata |
OLD | NEW |