OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <iterator> | 5 #include <iterator> |
6 #include <string> | 6 #include <string> |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 const CrxDataCallback& crx_data_callback, | 52 const CrxDataCallback& crx_data_callback, |
53 const Callback& callback)); | 53 const Callback& callback)); |
54 MOCK_METHOD3(Update, | 54 MOCK_METHOD3(Update, |
55 void(const std::vector<std::string>& ids, | 55 void(const std::vector<std::string>& ids, |
56 const CrxDataCallback& crx_data_callback, | 56 const CrxDataCallback& crx_data_callback, |
57 const Callback& callback)); | 57 const Callback& callback)); |
58 MOCK_CONST_METHOD2(GetCrxUpdateState, | 58 MOCK_CONST_METHOD2(GetCrxUpdateState, |
59 bool(const std::string& id, CrxUpdateItem* update_item)); | 59 bool(const std::string& id, CrxUpdateItem* update_item)); |
60 MOCK_CONST_METHOD1(IsUpdating, bool(const std::string& id)); | 60 MOCK_CONST_METHOD1(IsUpdating, bool(const std::string& id)); |
61 MOCK_METHOD0(Stop, void()); | 61 MOCK_METHOD0(Stop, void()); |
62 MOCK_METHOD3( | 62 MOCK_METHOD4(SendUninstallPing, |
63 SendUninstallPing, | 63 void(const std::string& id, |
64 void(const std::string& id, const base::Version& version, int reason)); | 64 const base::Version& version, |
| 65 int reason, |
| 66 const Callback& callback)); |
65 | 67 |
66 private: | 68 private: |
67 ~MockUpdateClient() override {} | 69 ~MockUpdateClient() override {} |
68 }; | 70 }; |
69 | 71 |
70 class FakeInstallerTraits : public ComponentInstallerTraits { | 72 class FakeInstallerTraits : public ComponentInstallerTraits { |
71 public: | 73 public: |
72 ~FakeInstallerTraits() override {} | 74 ~FakeInstallerTraits() override {} |
73 | 75 |
74 bool VerifyInstallation(const base::DictionaryValue& manifest, | 76 bool VerifyInstallation(const base::DictionaryValue& manifest, |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 component.pk_hash); | 230 component.pk_hash); |
229 EXPECT_EQ(base::Version("0.0.0.0"), component.version); | 231 EXPECT_EQ(base::Version("0.0.0.0"), component.version); |
230 EXPECT_TRUE(component.fingerprint.empty()); | 232 EXPECT_TRUE(component.fingerprint.empty()); |
231 EXPECT_STREQ("fake name", component.name.c_str()); | 233 EXPECT_STREQ("fake name", component.name.c_str()); |
232 EXPECT_EQ(expected_attrs, component.installer_attributes); | 234 EXPECT_EQ(expected_attrs, component.installer_attributes); |
233 EXPECT_TRUE(component.requires_network_encryption); | 235 EXPECT_TRUE(component.requires_network_encryption); |
234 EXPECT_TRUE(component.supports_group_policy_enable_component_updates); | 236 EXPECT_TRUE(component.supports_group_policy_enable_component_updates); |
235 } | 237 } |
236 | 238 |
237 } // namespace component_updater | 239 } // namespace component_updater |
OLD | NEW |