| 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 <cert.h> | 5 #include <cert.h> |
| 6 #include <pk11pub.h> | 6 #include <pk11pub.h> |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 void LoadOncAndVerifyNetworks(std::string onc_file, | 165 void LoadOncAndVerifyNetworks(std::string onc_file, |
| 166 std::string shill_json, | 166 std::string shill_json, |
| 167 onc::ONCSource source, | 167 onc::ONCSource source, |
| 168 bool expect_successful_import) { | 168 bool expect_successful_import) { |
| 169 ScopedMockUserManagerEnabler mock_user_manager; | 169 ScopedMockUserManagerEnabler mock_user_manager; |
| 170 mock_user_manager.user_manager()->SetActiveUser("madmax@my.domain.com"); | 170 mock_user_manager.user_manager()->SetActiveUser("madmax@my.domain.com"); |
| 171 EXPECT_CALL(*mock_user_manager.user_manager(), IsUserLoggedIn()) | 171 EXPECT_CALL(*mock_user_manager.user_manager(), IsUserLoggedIn()) |
| 172 .Times(AnyNumber()) | 172 .Times(AnyNumber()) |
| 173 .WillRepeatedly(Return(true)); | 173 .WillRepeatedly(Return(true)); |
| 174 | 174 |
| 175 std::string onc_blob = | 175 std::string onc_blob = onc::test_utils::ReadTestData(onc_file); |
| 176 onc::test_utils::ReadTestData(onc_file); | |
| 177 | 176 |
| 178 scoped_ptr<base::Value> expected_value = | 177 scoped_ptr<base::Value> expected_value = |
| 179 google_apis::test_util::LoadJSONFile(shill_json); | 178 google_apis::test_util::LoadJSONFile(shill_json); |
| 180 base::DictionaryValue* expected_configs; | 179 base::DictionaryValue* expected_configs; |
| 181 expected_value->GetAsDictionary(&expected_configs); | 180 expected_value->GetAsDictionary(&expected_configs); |
| 182 | 181 |
| 183 net::CertificateList cert_list; | 182 net::CertificateList cert_list; |
| 184 EXPECT_EQ(expect_successful_import, | 183 EXPECT_EQ(expect_successful_import, |
| 185 cros_->LoadOncNetworks(onc_blob, "", source, &cert_list)); | 184 cros_->LoadOncNetworks(onc_blob, "", source, &cert_list)); |
| 186 | 185 |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 | 500 |
| 502 // TODO(stevenjb): Test network profiles. | 501 // TODO(stevenjb): Test network profiles. |
| 503 | 502 |
| 504 // TODO(stevenjb): Test network devices. | 503 // TODO(stevenjb): Test network devices. |
| 505 | 504 |
| 506 // TODO(stevenjb): Test data plans. | 505 // TODO(stevenjb): Test data plans. |
| 507 | 506 |
| 508 // TODO(stevenjb): Test monitor network / device. | 507 // TODO(stevenjb): Test monitor network / device. |
| 509 | 508 |
| 510 } // namespace chromeos | 509 } // namespace chromeos |
| OLD | NEW |