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 "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chromeos/network/onc/onc_constants.h" | 9 #include "chromeos/network/onc/onc_constants.h" |
10 #include "chromeos/network/onc/onc_signature.h" | 10 #include "chromeos/network/onc/onc_signature.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 EXPECT_TRUE(test_utils::Equals(expected_shill_network.get(), | 35 EXPECT_TRUE(test_utils::Equals(expected_shill_network.get(), |
36 translation.get())); | 36 translation.get())); |
37 } | 37 } |
38 | 38 |
39 // Test different network types, such that each ONC object type is tested at | 39 // Test different network types, such that each ONC object type is tested at |
40 // least once. | 40 // least once. |
41 INSTANTIATE_TEST_CASE_P( | 41 INSTANTIATE_TEST_CASE_P( |
42 ONCTranslatorOncToShillTest, | 42 ONCTranslatorOncToShillTest, |
43 ONCTranslatorOncToShillTest, | 43 ONCTranslatorOncToShillTest, |
44 ::testing::Values( | 44 ::testing::Values( |
45 std::make_pair("managed_ethernet.onc", "shill_ethernet.json"), | 45 std::make_pair("ethernet.onc", "shill_ethernet.json"), |
| 46 std::make_pair("ethernet_with_eap_and_cert_pems.onc", |
| 47 "shill_ethernet_with_eap.json"), |
46 std::make_pair("valid_wifi_psk.onc", "shill_wifi_psk.json"), | 48 std::make_pair("valid_wifi_psk.onc", "shill_wifi_psk.json"), |
47 std::make_pair("wifi_clientcert_with_cert_pems.onc", | 49 std::make_pair("wifi_clientcert_with_cert_pems.onc", |
48 "shill_wifi_clientcert.json"), | 50 "shill_wifi_clientcert.json"), |
49 std::make_pair("valid_wifi_clientref.onc", "shill_wifi_clientref.json"), | 51 std::make_pair("valid_wifi_clientref.onc", "shill_wifi_clientref.json"), |
50 std::make_pair("valid_l2tpipsec.onc", "shill_l2tpipsec.json"), | 52 std::make_pair("valid_l2tpipsec.onc", "shill_l2tpipsec.json"), |
51 std::make_pair("l2tpipsec_clientcert_with_cert_pems.onc", | 53 std::make_pair("l2tpipsec_clientcert_with_cert_pems.onc", |
52 "shill_l2tpipsec_clientcert.json"), | 54 "shill_l2tpipsec_clientcert.json"), |
53 std::make_pair("valid_openvpn_with_cert_pems.onc", | 55 std::make_pair("valid_openvpn_with_cert_pems.onc", |
54 "shill_openvpn.json"), | 56 "shill_openvpn.json"), |
55 std::make_pair("openvpn_clientcert_with_cert_pems.onc", | 57 std::make_pair("openvpn_clientcert_with_cert_pems.onc", |
(...skipping 23 matching lines...) Expand all Loading... |
79 *shill_network, &kNetworkWithStateSignature)); | 81 *shill_network, &kNetworkWithStateSignature)); |
80 | 82 |
81 EXPECT_TRUE(test_utils::Equals(expected_onc_network.get(), | 83 EXPECT_TRUE(test_utils::Equals(expected_onc_network.get(), |
82 translation.get())); | 84 translation.get())); |
83 } | 85 } |
84 | 86 |
85 INSTANTIATE_TEST_CASE_P( | 87 INSTANTIATE_TEST_CASE_P( |
86 ONCTranslatorShillToOncTest, | 88 ONCTranslatorShillToOncTest, |
87 ONCTranslatorShillToOncTest, | 89 ONCTranslatorShillToOncTest, |
88 ::testing::Values( | 90 ::testing::Values( |
| 91 std::make_pair("shill_ethernet.json", |
| 92 "translation_of_shill_ethernet.onc"), |
| 93 std::make_pair("shill_ethernet_with_eap.json", |
| 94 "translation_of_shill_ethernet_with_eap.onc"), |
89 std::make_pair("shill_wifi_clientcert.json", | 95 std::make_pair("shill_wifi_clientcert.json", |
90 "translation_of_shill_wifi_clientcert.onc"), | 96 "translation_of_shill_wifi_clientcert.onc"), |
91 std::make_pair("shill_wifi_wpa1.json", | 97 std::make_pair("shill_wifi_wpa1.json", |
92 "translation_of_shill_wifi_wpa1.onc"), | 98 "translation_of_shill_wifi_wpa1.onc"), |
93 std::make_pair("shill_l2tpipsec.json", | 99 std::make_pair("shill_l2tpipsec.json", |
94 "translation_of_shill_l2tpipsec.onc"), | 100 "translation_of_shill_l2tpipsec.onc"), |
95 std::make_pair("shill_openvpn.json", | 101 std::make_pair("shill_openvpn.json", |
96 "translation_of_shill_openvpn.onc"), | 102 "translation_of_shill_openvpn.onc"), |
97 std::make_pair("shill_openvpn_with_errors.json", | 103 std::make_pair("shill_openvpn_with_errors.json", |
98 "translation_of_shill_openvpn_with_errors.onc"), | 104 "translation_of_shill_openvpn_with_errors.onc"), |
99 std::make_pair("shill_wifi_with_state.json", | 105 std::make_pair("shill_wifi_with_state.json", |
100 "translation_of_shill_wifi_with_state.onc"), | 106 "translation_of_shill_wifi_with_state.onc"), |
101 std::make_pair("shill_cellular_with_state.json", | 107 std::make_pair("shill_cellular_with_state.json", |
102 "translation_of_shill_cellular_with_state.onc"))); | 108 "translation_of_shill_cellular_with_state.onc"))); |
103 | 109 |
104 } // namespace onc | 110 } // namespace onc |
105 } // namespace chromeos | 111 } // namespace chromeos |
OLD | NEW |