Index: chrome/browser/chromeos/customization/customization_document_unittest.cc |
diff --git a/chrome/browser/chromeos/customization/customization_document_unittest.cc b/chrome/browser/chromeos/customization/customization_document_unittest.cc |
index a1d7356645653102590cb1d2d820bc5d14ed92ff..1d35c5b859bf00fa9e5946d099ac452b0cf448fb 100644 |
--- a/chrome/browser/chromeos/customization/customization_document_unittest.cc |
+++ b/chrome/browser/chromeos/customization/customization_document_unittest.cc |
@@ -39,6 +39,8 @@ using ::testing::Exactly; |
using ::testing::Invoke; |
using ::testing::Mock; |
using ::testing::_; |
+using extensions::ExternalExtensionInstallInfoFile; |
+using extensions::ExternalExtensionInstallInfoUpdateUrl; |
namespace { |
@@ -184,23 +186,17 @@ class MockExternalProviderVisitor |
public: |
MockExternalProviderVisitor() {} |
- MOCK_METHOD7(OnExternalExtensionFileFound, |
- bool(const std::string&, |
- const base::Version*, |
- const base::FilePath&, |
- extensions::Manifest::Location, |
- int, |
- bool, |
- bool)); |
- MOCK_METHOD6(OnExternalExtensionUpdateUrlFound, |
- bool(const std::string&, |
- const std::string&, |
- const GURL&, |
- extensions::Manifest::Location, |
- int, |
- bool)); |
+ MOCK_METHOD1(OnExternalExtensionFileFound, |
+ bool(ExternalExtensionInstallInfoFile*)); |
+ MOCK_METHOD2(OnExternalExtensionUpdateUrlFound, |
+ bool(ExternalExtensionInstallInfoUpdateUrl*, bool)); |
MOCK_METHOD1(OnExternalProviderReady, |
void(const extensions::ExternalProviderInterface* provider)); |
+ MOCK_METHOD4(OnExternalProviderUpdateComplete, |
+ void(const extensions::ExternalProviderInterface*, |
+ const ScopedVector<ExternalExtensionInstallInfoUpdateUrl>&, |
+ const ScopedVector<ExternalExtensionInstallInfoFile>&, |
+ const std::set<std::string>& removed_extensions)); |
}; |
class ServicesCustomizationDocumentTest : public testing::Test { |
@@ -362,12 +358,11 @@ TEST_F(ServicesCustomizationDocumentTest, NoCustomizationIdInVpd) { |
extensions::Extension::FROM_WEBSTORE | |
extensions::Extension::WAS_INSTALLED_BY_DEFAULT)); |
- EXPECT_CALL(visitor, OnExternalExtensionFileFound(_, _, _, _, _, _, _)) |
- .Times(0); |
- EXPECT_CALL(visitor, OnExternalExtensionUpdateUrlFound(_, _, _, _, _, _)) |
- .Times(0); |
+ EXPECT_CALL(visitor, OnExternalExtensionFileFound(_)).Times(0); |
+ EXPECT_CALL(visitor, OnExternalExtensionUpdateUrlFound(_, _)).Times(0); |
EXPECT_CALL(visitor, OnExternalProviderReady(_)) |
.Times(1); |
+ EXPECT_CALL(visitor, OnExternalProviderUpdateComplete(_, _, _, _)).Times(0); |
// Manually request a load. |
RunUntilIdle(); |
@@ -407,23 +402,21 @@ TEST_F(ServicesCustomizationDocumentTest, DefaultApps) { |
extensions::Extension::FROM_WEBSTORE | |
extensions::Extension::WAS_INSTALLED_BY_DEFAULT)); |
- EXPECT_CALL(visitor, OnExternalExtensionFileFound(_, _, _, _, _, _, _)) |
- .Times(0); |
- EXPECT_CALL(visitor, OnExternalExtensionUpdateUrlFound(_, _, _, _, _, _)) |
- .Times(0); |
+ EXPECT_CALL(visitor, OnExternalExtensionFileFound(_)).Times(0); |
+ EXPECT_CALL(visitor, OnExternalExtensionUpdateUrlFound(_, _)).Times(0); |
EXPECT_CALL(visitor, OnExternalProviderReady(_)) |
.Times(1); |
+ EXPECT_CALL(visitor, OnExternalProviderUpdateComplete(_, _, _, _)).Times(0); |
// Manually request a load. |
loader->StartLoading(); |
Mock::VerifyAndClearExpectations(&visitor); |
- EXPECT_CALL(visitor, OnExternalExtensionFileFound(_, _, _, _, _, _, _)) |
- .Times(0); |
- EXPECT_CALL(visitor, OnExternalExtensionUpdateUrlFound(_, _, _, _, _, _)) |
- .Times(2); |
+ EXPECT_CALL(visitor, OnExternalExtensionFileFound(_)).Times(0); |
+ EXPECT_CALL(visitor, OnExternalExtensionUpdateUrlFound(_, _)).Times(2); |
EXPECT_CALL(visitor, OnExternalProviderReady(_)) |
.Times(1); |
+ EXPECT_CALL(visitor, OnExternalProviderUpdateComplete(_, _, _, _)).Times(0); |
RunUntilIdle(); |
EXPECT_TRUE(doc->IsReady()); |
@@ -457,23 +450,21 @@ TEST_F(ServicesCustomizationDocumentTest, CustomizationManifestNotFound) { |
extensions::Extension::FROM_WEBSTORE | |
extensions::Extension::WAS_INSTALLED_BY_DEFAULT)); |
- EXPECT_CALL(visitor, OnExternalExtensionFileFound(_, _, _, _, _, _, _)) |
- .Times(0); |
- EXPECT_CALL(visitor, OnExternalExtensionUpdateUrlFound(_, _, _, _, _, _)) |
- .Times(0); |
+ EXPECT_CALL(visitor, OnExternalExtensionFileFound(_)).Times(0); |
+ EXPECT_CALL(visitor, OnExternalExtensionUpdateUrlFound(_, _)).Times(0); |
EXPECT_CALL(visitor, OnExternalProviderReady(_)) |
.Times(1); |
+ EXPECT_CALL(visitor, OnExternalProviderUpdateComplete(_, _, _, _)).Times(0); |
// Manually request a load. |
loader->StartLoading(); |
Mock::VerifyAndClearExpectations(&visitor); |
- EXPECT_CALL(visitor, OnExternalExtensionFileFound(_, _, _, _, _, _, _)) |
- .Times(0); |
- EXPECT_CALL(visitor, OnExternalExtensionUpdateUrlFound(_, _, _, _, _, _)) |
- .Times(0); |
+ EXPECT_CALL(visitor, OnExternalExtensionFileFound(_)).Times(0); |
+ EXPECT_CALL(visitor, OnExternalExtensionUpdateUrlFound(_, _)).Times(0); |
EXPECT_CALL(visitor, OnExternalProviderReady(_)) |
.Times(1); |
+ EXPECT_CALL(visitor, OnExternalProviderUpdateComplete(_, _, _, _)).Times(0); |
RunUntilIdle(); |
EXPECT_TRUE(doc->IsReady()); |