| 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_signature.h" | 9 #include "chromeos/network/onc/onc_signature.h" |
| 10 #include "chromeos/network/onc/onc_test_utils.h" | 10 #include "chromeos/network/onc/onc_test_utils.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 TEST_P(ONCTranslatorShillToOncTest, Translate) { | 71 TEST_P(ONCTranslatorShillToOncTest, Translate) { |
| 72 std::string source_shill_filename = GetParam().first; | 72 std::string source_shill_filename = GetParam().first; |
| 73 scoped_ptr<const base::DictionaryValue> shill_network( | 73 scoped_ptr<const base::DictionaryValue> shill_network( |
| 74 test_utils::ReadTestDictionary(source_shill_filename)); | 74 test_utils::ReadTestDictionary(source_shill_filename)); |
| 75 | 75 |
| 76 std::string result_onc_filename = GetParam().second; | 76 std::string result_onc_filename = GetParam().second; |
| 77 scoped_ptr<base::DictionaryValue> expected_onc_network( | 77 scoped_ptr<base::DictionaryValue> expected_onc_network( |
| 78 test_utils::ReadTestDictionary(result_onc_filename)); | 78 test_utils::ReadTestDictionary(result_onc_filename)); |
| 79 | 79 |
| 80 scoped_ptr<base::DictionaryValue> translation(TranslateShillServiceToONCPart( | 80 scoped_ptr<base::DictionaryValue> translation(TranslateShillServiceToONCPart( |
| 81 *shill_network, &kNetworkWithStateSignature)); | 81 *shill_network, ::onc::ONC_SOURCE_NONE, &kNetworkWithStateSignature)); |
| 82 | 82 |
| 83 EXPECT_TRUE(test_utils::Equals(expected_onc_network.get(), | 83 EXPECT_TRUE(test_utils::Equals(expected_onc_network.get(), |
| 84 translation.get())); | 84 translation.get())); |
| 85 } | 85 } |
| 86 | 86 |
| 87 INSTANTIATE_TEST_CASE_P( | 87 INSTANTIATE_TEST_CASE_P( |
| 88 ONCTranslatorShillToOncTest, | 88 ONCTranslatorShillToOncTest, |
| 89 ONCTranslatorShillToOncTest, | 89 ONCTranslatorShillToOncTest, |
| 90 ::testing::Values( | 90 ::testing::Values( |
| 91 std::make_pair("shill_ethernet.json", | 91 std::make_pair("shill_ethernet.json", |
| (...skipping 12 matching lines...) Expand all Loading... |
| 104 "translation_of_shill_openvpn.onc"), | 104 "translation_of_shill_openvpn.onc"), |
| 105 std::make_pair("shill_output_openvpn_with_errors.json", | 105 std::make_pair("shill_output_openvpn_with_errors.json", |
| 106 "translation_of_shill_openvpn_with_errors.onc"), | 106 "translation_of_shill_openvpn_with_errors.onc"), |
| 107 std::make_pair("shill_wifi_with_state.json", | 107 std::make_pair("shill_wifi_with_state.json", |
| 108 "translation_of_shill_wifi_with_state.onc"), | 108 "translation_of_shill_wifi_with_state.onc"), |
| 109 std::make_pair("shill_cellular_with_state.json", | 109 std::make_pair("shill_cellular_with_state.json", |
| 110 "translation_of_shill_cellular_with_state.onc"))); | 110 "translation_of_shill_cellular_with_state.onc"))); |
| 111 | 111 |
| 112 } // namespace onc | 112 } // namespace onc |
| 113 } // namespace chromeos | 113 } // namespace chromeos |
| OLD | NEW |