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

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

Issue 1085993002: Revert of Use networkingPrivate.startConnect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_430115_internet_options_cellular
Patch Set: Created 5 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_translator.h" 5 #include "chromeos/network/onc/onc_translator.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 TEST_P(ONCTranslatorShillToOncTest, Translate) { 76 TEST_P(ONCTranslatorShillToOncTest, Translate) {
77 std::string source_shill_filename = GetParam().first; 77 std::string source_shill_filename = GetParam().first;
78 scoped_ptr<const base::DictionaryValue> shill_network( 78 scoped_ptr<const base::DictionaryValue> shill_network(
79 test_utils::ReadTestDictionary(source_shill_filename)); 79 test_utils::ReadTestDictionary(source_shill_filename));
80 80
81 std::string result_onc_filename = GetParam().second; 81 std::string result_onc_filename = GetParam().second;
82 scoped_ptr<base::DictionaryValue> expected_onc_network( 82 scoped_ptr<base::DictionaryValue> expected_onc_network(
83 test_utils::ReadTestDictionary(result_onc_filename)); 83 test_utils::ReadTestDictionary(result_onc_filename));
84 84
85 scoped_ptr<base::DictionaryValue> translation(TranslateShillServiceToONCPart( 85 scoped_ptr<base::DictionaryValue> translation(TranslateShillServiceToONCPart(
86 *shill_network, ::onc::ONC_SOURCE_NONE, &kNetworkWithStateSignature, 86 *shill_network, ::onc::ONC_SOURCE_NONE, &kNetworkWithStateSignature));
87 nullptr /* network_state */));
88 87
89 EXPECT_TRUE(test_utils::Equals(expected_onc_network.get(), 88 EXPECT_TRUE(test_utils::Equals(expected_onc_network.get(),
90 translation.get())); 89 translation.get()));
91 } 90 }
92 91
93 INSTANTIATE_TEST_CASE_P( 92 INSTANTIATE_TEST_CASE_P(
94 ONCTranslatorShillToOncTest, 93 ONCTranslatorShillToOncTest,
95 ONCTranslatorShillToOncTest, 94 ONCTranslatorShillToOncTest,
96 ::testing::Values( 95 ::testing::Values(
97 std::make_pair("shill_ethernet.json", 96 std::make_pair("shill_ethernet.json",
(...skipping 16 matching lines...) Expand all
114 "translation_of_shill_wifi_with_state.onc"), 113 "translation_of_shill_wifi_with_state.onc"),
115 std::make_pair("shill_cellular_with_state.json", 114 std::make_pair("shill_cellular_with_state.json",
116 "translation_of_shill_cellular_with_state.onc"), 115 "translation_of_shill_cellular_with_state.onc"),
117 std::make_pair("shill_wimax_with_state.json", 116 std::make_pair("shill_wimax_with_state.json",
118 "translation_of_shill_wimax_with_state.onc"), 117 "translation_of_shill_wimax_with_state.onc"),
119 std::make_pair("shill_output_third_party_vpn.json", 118 std::make_pair("shill_output_third_party_vpn.json",
120 "third_party_vpn.onc"))); 119 "third_party_vpn.onc")));
121 120
122 } // namespace onc 121 } // namespace onc
123 } // namespace chromeos 122 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/onc/onc_translator_shill_to_onc.cc ('k') | chromeos/network/policy_applicator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698