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

Side by Side Diff: chrome/browser/component_updater/origin_trials_component_installer_unittest.cc

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 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
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 "chrome/browser/component_updater/origin_trials_component_installer.h" 5 #include "chrome/browser/component_updater/origin_trials_component_installer.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 ScopedTestingLocalState testing_local_state_; 108 ScopedTestingLocalState testing_local_state_;
109 std::unique_ptr<ComponentInstallerTraits> traits_; 109 std::unique_ptr<ComponentInstallerTraits> traits_;
110 110
111 private: 111 private:
112 DISALLOW_COPY_AND_ASSIGN(OriginTrialsComponentInstallerTest); 112 DISALLOW_COPY_AND_ASSIGN(OriginTrialsComponentInstallerTest);
113 }; 113 };
114 114
115 TEST_F(OriginTrialsComponentInstallerTest, 115 TEST_F(OriginTrialsComponentInstallerTest,
116 PublicKeyResetToDefaultWhenOverrideMissing) { 116 PublicKeyResetToDefaultWhenOverrideMissing) {
117 local_state()->Set(prefs::kOriginTrialPublicKey, 117 local_state()->Set(prefs::kOriginTrialPublicKey,
118 base::StringValue(kExistingPublicKey)); 118 base::Value(kExistingPublicKey));
119 ASSERT_EQ(kExistingPublicKey, 119 ASSERT_EQ(kExistingPublicKey,
120 local_state()->GetString(prefs::kOriginTrialPublicKey)); 120 local_state()->GetString(prefs::kOriginTrialPublicKey));
121 121
122 // Load with empty section in manifest 122 // Load with empty section in manifest
123 LoadUpdates(nullptr); 123 LoadUpdates(nullptr);
124 124
125 EXPECT_FALSE(local_state()->HasPrefPath(prefs::kOriginTrialPublicKey)); 125 EXPECT_FALSE(local_state()->HasPrefPath(prefs::kOriginTrialPublicKey));
126 } 126 }
127 127
128 TEST_F(OriginTrialsComponentInstallerTest, PublicKeySetWhenOverrideExists) { 128 TEST_F(OriginTrialsComponentInstallerTest, PublicKeySetWhenOverrideExists) {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 disabled_feature_list->AppendStrings(kNewDisabledFeatures); 187 disabled_feature_list->AppendStrings(kNewDisabledFeatures);
188 manifest->Set(kManifestDisabledFeaturesPath, 188 manifest->Set(kManifestDisabledFeaturesPath,
189 std::move(disabled_feature_list)); 189 std::move(disabled_feature_list));
190 190
191 LoadUpdates(std::move(manifest)); 191 LoadUpdates(std::move(manifest));
192 192
193 CheckDisabledFeaturesPrefs(kNewDisabledFeatures); 193 CheckDisabledFeaturesPrefs(kNewDisabledFeatures);
194 } 194 }
195 195
196 } // namespace component_updater 196 } // namespace component_updater
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698