OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/customization/customization_document.h" | 5 #include "chrome/browser/chromeos/customization/customization_document.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 : public extensions::ExternalProviderInterface::VisitorInterface { | 186 : public extensions::ExternalProviderInterface::VisitorInterface { |
187 public: | 187 public: |
188 MockExternalProviderVisitor() {} | 188 MockExternalProviderVisitor() {} |
189 | 189 |
190 MOCK_METHOD1(OnExternalExtensionFileFound, | 190 MOCK_METHOD1(OnExternalExtensionFileFound, |
191 bool(const ExternalInstallInfoFile&)); | 191 bool(const ExternalInstallInfoFile&)); |
192 MOCK_METHOD2(OnExternalExtensionUpdateUrlFound, | 192 MOCK_METHOD2(OnExternalExtensionUpdateUrlFound, |
193 bool(const ExternalInstallInfoUpdateUrl&, bool)); | 193 bool(const ExternalInstallInfoUpdateUrl&, bool)); |
194 MOCK_METHOD1(OnExternalProviderReady, | 194 MOCK_METHOD1(OnExternalProviderReady, |
195 void(const extensions::ExternalProviderInterface* provider)); | 195 void(const extensions::ExternalProviderInterface* provider)); |
196 MOCK_METHOD4(OnExternalProviderUpdateComplete, | 196 MOCK_METHOD4( |
197 void(const extensions::ExternalProviderInterface*, | 197 OnExternalProviderUpdateComplete, |
198 const ScopedVector<ExternalInstallInfoUpdateUrl>&, | 198 void(const extensions::ExternalProviderInterface*, |
199 const ScopedVector<ExternalInstallInfoFile>&, | 199 const std::vector<std::unique_ptr<ExternalInstallInfoUpdateUrl>>&, |
200 const std::set<std::string>& removed_extensions)); | 200 const std::vector<std::unique_ptr<ExternalInstallInfoFile>>&, |
| 201 const std::set<std::string>& removed_extensions)); |
201 }; | 202 }; |
202 | 203 |
203 class ServicesCustomizationDocumentTest : public testing::Test { | 204 class ServicesCustomizationDocumentTest : public testing::Test { |
204 protected: | 205 protected: |
205 ServicesCustomizationDocumentTest() | 206 ServicesCustomizationDocumentTest() |
206 : factory_(nullptr, | 207 : factory_(nullptr, |
207 base::Bind(&TestURLFetcherCallback::CreateURLFetcher, | 208 base::Bind(&TestURLFetcherCallback::CreateURLFetcher, |
208 base::Unretained(&url_callback_))) {} | 209 base::Unretained(&url_callback_))) {} |
209 | 210 |
210 // testing::Test: | 211 // testing::Test: |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 EXPECT_CALL(visitor, OnExternalExtensionUpdateUrlFound(_, _)).Times(0); | 457 EXPECT_CALL(visitor, OnExternalExtensionUpdateUrlFound(_, _)).Times(0); |
457 EXPECT_CALL(visitor, OnExternalProviderReady(_)) | 458 EXPECT_CALL(visitor, OnExternalProviderReady(_)) |
458 .Times(1); | 459 .Times(1); |
459 EXPECT_CALL(visitor, OnExternalProviderUpdateComplete(_, _, _, _)).Times(0); | 460 EXPECT_CALL(visitor, OnExternalProviderUpdateComplete(_, _, _, _)).Times(0); |
460 | 461 |
461 RunUntilIdle(); | 462 RunUntilIdle(); |
462 EXPECT_TRUE(doc->IsReady()); | 463 EXPECT_TRUE(doc->IsReady()); |
463 } | 464 } |
464 | 465 |
465 } // namespace chromeos | 466 } // namespace chromeos |
OLD | NEW |