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

Side by Side Diff: chrome/browser/chromeos/policy/network_configuration_updater_unittest.cc

Issue 2816513002: Revert of Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Created 3 years, 8 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 "}"; 179 "}";
180 180
181 std::string ValueToString(const base::Value& value) { 181 std::string ValueToString(const base::Value& value) {
182 std::stringstream str; 182 std::stringstream str;
183 str << value; 183 str << value;
184 return str.str(); 184 return str.str();
185 } 185 }
186 186
187 void AppendAll(const base::ListValue& from, base::ListValue* to) { 187 void AppendAll(const base::ListValue& from, base::ListValue* to) {
188 for (const auto& value : from) 188 for (const auto& value : from)
189 to->Append(value.CreateDeepCopy()); 189 to->Append(value->CreateDeepCopy());
190 } 190 }
191 191
192 // Matcher to match base::Value. 192 // Matcher to match base::Value.
193 MATCHER_P(IsEqualTo, 193 MATCHER_P(IsEqualTo,
194 value, 194 value,
195 std::string(negation ? "isn't" : "is") + " equal to " + 195 std::string(negation ? "isn't" : "is") + " equal to " +
196 ValueToString(*value)) { 196 ValueToString(*value)) {
197 return value->Equals(&arg); 197 return value->Equals(&arg);
198 } 198 }
199 199
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 EXPECT_EQ(ExpectedImportCertificatesCallCount(), 674 EXPECT_EQ(ExpectedImportCertificatesCallCount(),
675 certificate_importer_->GetAndResetImportCount()); 675 certificate_importer_->GetAndResetImportCount());
676 } 676 }
677 677
678 INSTANTIATE_TEST_CASE_P(NetworkConfigurationUpdaterTestWithParamInstance, 678 INSTANTIATE_TEST_CASE_P(NetworkConfigurationUpdaterTestWithParamInstance,
679 NetworkConfigurationUpdaterTestWithParam, 679 NetworkConfigurationUpdaterTestWithParam,
680 testing::Values(key::kDeviceOpenNetworkConfiguration, 680 testing::Values(key::kDeviceOpenNetworkConfiguration,
681 key::kOpenNetworkConfiguration)); 681 key::kOpenNetworkConfiguration));
682 682
683 } // namespace policy 683 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698