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

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

Issue 2292463004: Fix DefaultComponentInstaller::FinishRegistration and group policy. (Closed)
Patch Set: nop Created 4 years, 3 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/default_component_installer.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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 class FakeInstallerTraits : public ComponentInstallerTraits { 69 class FakeInstallerTraits : public ComponentInstallerTraits {
70 public: 70 public:
71 ~FakeInstallerTraits() override {} 71 ~FakeInstallerTraits() override {}
72 72
73 bool VerifyInstallation(const base::DictionaryValue& manifest, 73 bool VerifyInstallation(const base::DictionaryValue& manifest,
74 const base::FilePath& dir) const override { 74 const base::FilePath& dir) const override {
75 return true; 75 return true;
76 } 76 }
77 77
78 bool SupportsGroupPolicyEnabledComponentUpdates() const override { 78 bool SupportsGroupPolicyEnabledComponentUpdates() const override {
79 return false; 79 return true;
80 } 80 }
81 81
82 bool RequiresNetworkEncryption() const override { return true; } 82 bool RequiresNetworkEncryption() const override { return true; }
83 83
84 bool OnCustomInstall(const base::DictionaryValue& manifest, 84 bool OnCustomInstall(const base::DictionaryValue& manifest,
85 const base::FilePath& install_dir) override { 85 const base::FilePath& install_dir) override {
86 return true; 86 return true;
87 } 87 }
88 88
89 void ComponentReady( 89 void ComponentReady(
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 expected_attrs["is-enterprise"] = "1"; 222 expected_attrs["is-enterprise"] = "1";
223 223
224 EXPECT_EQ( 224 EXPECT_EQ(
225 std::vector<uint8_t>(std::begin(kSha256Hash), std::end(kSha256Hash)), 225 std::vector<uint8_t>(std::begin(kSha256Hash), std::end(kSha256Hash)),
226 component.pk_hash); 226 component.pk_hash);
227 EXPECT_EQ(base::Version("0.0.0.0"), component.version); 227 EXPECT_EQ(base::Version("0.0.0.0"), component.version);
228 EXPECT_TRUE(component.fingerprint.empty()); 228 EXPECT_TRUE(component.fingerprint.empty());
229 EXPECT_STREQ("fake name", component.name.c_str()); 229 EXPECT_STREQ("fake name", component.name.c_str());
230 EXPECT_EQ(expected_attrs, component.installer_attributes); 230 EXPECT_EQ(expected_attrs, component.installer_attributes);
231 EXPECT_TRUE(component.requires_network_encryption); 231 EXPECT_TRUE(component.requires_network_encryption);
232 EXPECT_TRUE(component.supports_group_policy_enable_component_updates);
232 } 233 }
233 234
234 } // namespace component_updater 235 } // namespace component_updater
OLDNEW
« no previous file with comments | « components/component_updater/default_component_installer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698