OLD | NEW |
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 Loading... |
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 */)); |
87 | 88 |
88 EXPECT_TRUE(test_utils::Equals(expected_onc_network.get(), | 89 EXPECT_TRUE(test_utils::Equals(expected_onc_network.get(), |
89 translation.get())); | 90 translation.get())); |
90 } | 91 } |
91 | 92 |
92 INSTANTIATE_TEST_CASE_P( | 93 INSTANTIATE_TEST_CASE_P( |
93 ONCTranslatorShillToOncTest, | 94 ONCTranslatorShillToOncTest, |
94 ONCTranslatorShillToOncTest, | 95 ONCTranslatorShillToOncTest, |
95 ::testing::Values( | 96 ::testing::Values( |
96 std::make_pair("shill_ethernet.json", | 97 std::make_pair("shill_ethernet.json", |
(...skipping 16 matching lines...) Expand all Loading... |
113 "translation_of_shill_wifi_with_state.onc"), | 114 "translation_of_shill_wifi_with_state.onc"), |
114 std::make_pair("shill_cellular_with_state.json", | 115 std::make_pair("shill_cellular_with_state.json", |
115 "translation_of_shill_cellular_with_state.onc"), | 116 "translation_of_shill_cellular_with_state.onc"), |
116 std::make_pair("shill_wimax_with_state.json", | 117 std::make_pair("shill_wimax_with_state.json", |
117 "translation_of_shill_wimax_with_state.onc"), | 118 "translation_of_shill_wimax_with_state.onc"), |
118 std::make_pair("shill_output_third_party_vpn.json", | 119 std::make_pair("shill_output_third_party_vpn.json", |
119 "third_party_vpn.onc"))); | 120 "third_party_vpn.onc"))); |
120 | 121 |
121 } // namespace onc | 122 } // namespace onc |
122 } // namespace chromeos | 123 } // namespace chromeos |
OLD | NEW |