| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |