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

Side by Side Diff: chromeos/network/onc/onc_utils_unittest.cc

Issue 2785883003: Use unique_ptr<DictionaryValue> in ProxyConfigDictionary (Closed)
Patch Set: Fix compilation 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chromeos/network/onc/onc_utils.h" 5 #include "chromeos/network/onc/onc_utils.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/json/json_file_value_serializer.h" 9 #include "base/json/json_file_value_serializer.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 base::DictionaryValue* test_case; 218 base::DictionaryValue* test_case;
219 (*it)->GetAsDictionary(&test_case); 219 (*it)->GetAsDictionary(&test_case);
220 220
221 base::DictionaryValue* shill_proxy_config; 221 base::DictionaryValue* shill_proxy_config;
222 test_case->GetDictionary("ProxyConfig", &shill_proxy_config); 222 test_case->GetDictionary("ProxyConfig", &shill_proxy_config);
223 223
224 base::DictionaryValue* onc_proxy_settings; 224 base::DictionaryValue* onc_proxy_settings;
225 test_case->GetDictionary("ONC_ProxySettings", &onc_proxy_settings); 225 test_case->GetDictionary("ONC_ProxySettings", &onc_proxy_settings);
226 226
227 std::unique_ptr<base::DictionaryValue> actual_proxy_settings = 227 std::unique_ptr<base::DictionaryValue> actual_proxy_settings =
228 ConvertProxyConfigToOncProxySettings(*shill_proxy_config); 228 ConvertProxyConfigToOncProxySettings(
229 shill_proxy_config->CreateDeepCopy());
229 EXPECT_TRUE( 230 EXPECT_TRUE(
230 test_utils::Equals(onc_proxy_settings, actual_proxy_settings.get())); 231 test_utils::Equals(onc_proxy_settings, actual_proxy_settings.get()));
231 } 232 }
232 } 233 }
233 234
234 } // namespace onc 235 } // namespace onc
235 } // namespace chromeos 236 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698