Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(693)

Side by Side Diff: components/component_updater/default_component_installer_unittest.cc

Issue 2266543002: Consistently use namespaced base::Version in component_updater code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/component_updater/component_updater_service_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 const CrxDataCallback& crx_data_callback, 51 const CrxDataCallback& crx_data_callback,
52 const CompletionCallback& completion_callback)); 52 const CompletionCallback& completion_callback));
53 MOCK_METHOD3(Update, 53 MOCK_METHOD3(Update,
54 void(const std::vector<std::string>& ids, 54 void(const std::vector<std::string>& ids,
55 const CrxDataCallback& crx_data_callback, 55 const CrxDataCallback& crx_data_callback,
56 const CompletionCallback& completion_callback)); 56 const CompletionCallback& completion_callback));
57 MOCK_CONST_METHOD2(GetCrxUpdateState, 57 MOCK_CONST_METHOD2(GetCrxUpdateState,
58 bool(const std::string& id, CrxUpdateItem* update_item)); 58 bool(const std::string& id, CrxUpdateItem* update_item));
59 MOCK_CONST_METHOD1(IsUpdating, bool(const std::string& id)); 59 MOCK_CONST_METHOD1(IsUpdating, bool(const std::string& id));
60 MOCK_METHOD0(Stop, void()); 60 MOCK_METHOD0(Stop, void());
61 MOCK_METHOD3(SendUninstallPing, 61 MOCK_METHOD3(
62 void(const std::string& id, const Version& version, int reason)); 62 SendUninstallPing,
63 void(const std::string& id, const base::Version& version, int reason));
63 64
64 private: 65 private:
65 ~MockUpdateClient() override {} 66 ~MockUpdateClient() override {}
66 }; 67 };
67 68
68 class FakeInstallerTraits : public ComponentInstallerTraits { 69 class FakeInstallerTraits : public ComponentInstallerTraits {
69 public: 70 public:
70 ~FakeInstallerTraits() override {} 71 ~FakeInstallerTraits() override {}
71 72
72 bool VerifyInstallation(const base::DictionaryValue& manifest, 73 bool VerifyInstallation(const base::DictionaryValue& manifest,
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 std::vector<uint8_t>(std::begin(kSha256Hash), std::end(kSha256Hash)), 225 std::vector<uint8_t>(std::begin(kSha256Hash), std::end(kSha256Hash)),
225 component.pk_hash); 226 component.pk_hash);
226 EXPECT_EQ(base::Version("0.0.0.0"), component.version); 227 EXPECT_EQ(base::Version("0.0.0.0"), component.version);
227 EXPECT_TRUE(component.fingerprint.empty()); 228 EXPECT_TRUE(component.fingerprint.empty());
228 EXPECT_STREQ("fake name", component.name.c_str()); 229 EXPECT_STREQ("fake name", component.name.c_str());
229 EXPECT_EQ(expected_attrs, component.installer_attributes); 230 EXPECT_EQ(expected_attrs, component.installer_attributes);
230 EXPECT_TRUE(component.requires_network_encryption); 231 EXPECT_TRUE(component.requires_network_encryption);
231 } 232 }
232 233
233 } // namespace component_updater 234 } // namespace component_updater
OLDNEW
« no previous file with comments | « components/component_updater/component_updater_service_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698