| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 std::make_pair("valid_wifi_clientref.onc", "shill_wifi_clientref.json"), | 54 std::make_pair("valid_wifi_clientref.onc", "shill_wifi_clientref.json"), |
| 55 std::make_pair("valid_l2tpipsec.onc", "shill_l2tpipsec.json"), | 55 std::make_pair("valid_l2tpipsec.onc", "shill_l2tpipsec.json"), |
| 56 std::make_pair("wifi_dhcp.onc", "shill_wifi_dhcp.json"), | 56 std::make_pair("wifi_dhcp.onc", "shill_wifi_dhcp.json"), |
| 57 std::make_pair("l2tpipsec_clientcert_with_cert_pems.onc", | 57 std::make_pair("l2tpipsec_clientcert_with_cert_pems.onc", |
| 58 "shill_l2tpipsec_clientcert.json"), | 58 "shill_l2tpipsec_clientcert.json"), |
| 59 std::make_pair("valid_openvpn_with_cert_pems.onc", | 59 std::make_pair("valid_openvpn_with_cert_pems.onc", |
| 60 "shill_openvpn.json"), | 60 "shill_openvpn.json"), |
| 61 std::make_pair("openvpn_clientcert_with_cert_pems.onc", | 61 std::make_pair("openvpn_clientcert_with_cert_pems.onc", |
| 62 "shill_openvpn_clientcert.json"), | 62 "shill_openvpn_clientcert.json"), |
| 63 std::make_pair("cellular.onc", "shill_cellular.json"), | 63 std::make_pair("cellular.onc", "shill_cellular.json"), |
| 64 std::make_pair("wimax.onc", "shill_wimax.json"))); | 64 std::make_pair("wimax.onc", "shill_wimax.json"), |
| 65 std::make_pair("third_party_vpn.onc", "shill_third_party_vpn.json"))); |
| 65 | 66 |
| 66 // First parameter: Filename of source Shill json. | 67 // First parameter: Filename of source Shill json. |
| 67 // Second parameter: Filename of expected translated ONC network part. | 68 // Second parameter: Filename of expected translated ONC network part. |
| 68 // | 69 // |
| 69 // Note: This translation direction doesn't have to reconstruct all of the ONC | 70 // Note: This translation direction doesn't have to reconstruct all of the ONC |
| 70 // fields, as Chrome doesn't need all of a Service's properties. | 71 // fields, as Chrome doesn't need all of a Service's properties. |
| 71 class ONCTranslatorShillToOncTest | 72 class ONCTranslatorShillToOncTest |
| 72 : public ::testing::TestWithParam<std::pair<std::string, std::string> > { | 73 : public ::testing::TestWithParam<std::pair<std::string, std::string> > { |
| 73 }; | 74 }; |
| 74 | 75 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 "translation_of_shill_l2tpipsec.onc"), | 107 "translation_of_shill_l2tpipsec.onc"), |
| 107 std::make_pair("shill_output_openvpn.json", | 108 std::make_pair("shill_output_openvpn.json", |
| 108 "translation_of_shill_openvpn.onc"), | 109 "translation_of_shill_openvpn.onc"), |
| 109 std::make_pair("shill_output_openvpn_with_errors.json", | 110 std::make_pair("shill_output_openvpn_with_errors.json", |
| 110 "translation_of_shill_openvpn_with_errors.onc"), | 111 "translation_of_shill_openvpn_with_errors.onc"), |
| 111 std::make_pair("shill_wifi_with_state.json", | 112 std::make_pair("shill_wifi_with_state.json", |
| 112 "translation_of_shill_wifi_with_state.onc"), | 113 "translation_of_shill_wifi_with_state.onc"), |
| 113 std::make_pair("shill_cellular_with_state.json", | 114 std::make_pair("shill_cellular_with_state.json", |
| 114 "translation_of_shill_cellular_with_state.onc"), | 115 "translation_of_shill_cellular_with_state.onc"), |
| 115 std::make_pair("shill_wimax_with_state.json", | 116 std::make_pair("shill_wimax_with_state.json", |
| 116 "translation_of_shill_wimax_with_state.onc"))); | 117 "translation_of_shill_wimax_with_state.onc"), |
| 118 std::make_pair("shill_output_third_party_vpn.json", |
| 119 "third_party_vpn.onc"))); |
| 117 | 120 |
| 118 } // namespace onc | 121 } // namespace onc |
| 119 } // namespace chromeos | 122 } // namespace chromeos |
| OLD | NEW |