| Index: chrome/browser/chromeos/cros/network_library_unittest.cc
|
| diff --git a/chrome/browser/chromeos/cros/network_library_unittest.cc b/chrome/browser/chromeos/cros/network_library_unittest.cc
|
| index 2b1297312f9256a29c9f55c4fbe9e951b37f9dbc..5b2a9e1cf6027400a4a865f6da8b5b881e0670c4 100644
|
| --- a/chrome/browser/chromeos/cros/network_library_unittest.cc
|
| +++ b/chrome/browser/chromeos/cros/network_library_unittest.cc
|
| @@ -5,6 +5,7 @@
|
| #include <cert.h>
|
| #include <pk11pub.h>
|
|
|
| +#include <map>
|
| #include <string>
|
| #include <vector>
|
|
|
| @@ -32,8 +33,8 @@
|
| #include "testing/gmock/include/gmock/gmock.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| +using ::testing::AnyNumber;
|
| using ::testing::Return;
|
| -using ::testing::AtLeast;
|
|
|
| namespace chromeos {
|
|
|
| @@ -168,7 +169,7 @@ class NetworkLibraryStubTest : public ::testing::Test {
|
| ScopedMockUserManagerEnabler mock_user_manager;
|
| mock_user_manager.user_manager()->SetLoggedInUser("madmax@my.domain.com");
|
| EXPECT_CALL(*mock_user_manager.user_manager(), IsUserLoggedIn())
|
| - .Times(AtLeast(0))
|
| + .Times(AnyNumber())
|
| .WillRepeatedly(Return(true));
|
|
|
| std::string onc_blob =
|
| @@ -179,8 +180,9 @@ class NetworkLibraryStubTest : public ::testing::Test {
|
| base::DictionaryValue* expected_configs;
|
| expected_value->GetAsDictionary(&expected_configs);
|
|
|
| + net::CertificateList cert_list;
|
| EXPECT_EQ(expect_successful_import,
|
| - cros_->LoadOncNetworks(onc_blob, "", source, true));
|
| + cros_->LoadOncNetworks(onc_blob, "", source, &cert_list));
|
|
|
| const std::map<std::string, base::DictionaryValue*>& configs =
|
| cros_->GetConfigurations();
|
| @@ -324,9 +326,10 @@ TEST_F(NetworkLibraryStubTest, NetworkConnectWifiWithCertPattern) {
|
| onc_root->GetListWithoutPathExpansion(onc::toplevel_config::kCertificates,
|
| &certificates);
|
|
|
| - onc::CertificateImporter importer(true /* allow webtrust */);
|
| + onc::CertificateImporter importer(true /* allow trust imports */);
|
| + net::CertificateList cert_list;
|
| ASSERT_EQ(onc::CertificateImporter::IMPORT_OK,
|
| - importer.ParseAndStoreCertificates(*certificates));
|
| + importer.ParseAndStoreCertificates(*certificates, &cert_list));
|
|
|
| WifiNetwork* wifi = cros_->FindWifiNetworkByPath("wifi_cert_pattern");
|
|
|
| @@ -353,9 +356,10 @@ TEST_F(NetworkLibraryStubTest, NetworkConnectVPNWithCertPattern) {
|
| onc_root->GetListWithoutPathExpansion(onc::toplevel_config::kCertificates,
|
| &certificates);
|
|
|
| - onc::CertificateImporter importer(true /* allow webtrust */);
|
| + onc::CertificateImporter importer(true /* allow trust imports */);
|
| + net::CertificateList cert_list;
|
| ASSERT_EQ(onc::CertificateImporter::IMPORT_OK,
|
| - importer.ParseAndStoreCertificates(*certificates));
|
| + importer.ParseAndStoreCertificates(*certificates, &cert_list));
|
|
|
| VirtualNetwork* vpn = cros_->FindVirtualNetworkByPath("vpn_cert_pattern");
|
|
|
|
|