Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Side by Side Diff: chromeos/network/client_cert_resolver_unittest.cc

Issue 708563005: Use setProperties for IP Config. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_430113_internet_options_1
Patch Set: Fix win/mac test expectations Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "chromeos/network/client_cert_resolver.h" 4 #include "chromeos/network/client_cert_resolver.h"
5 5
6 #include <cert.h> 6 #include <cert.h>
7 #include <pk11pub.h> 7 #include <pk11pub.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 } 132 }
133 133
134 void SetupNetworkHandlers() { 134 void SetupNetworkHandlers() {
135 network_state_handler_.reset(NetworkStateHandler::InitializeForTest()); 135 network_state_handler_.reset(NetworkStateHandler::InitializeForTest());
136 network_profile_handler_.reset(new NetworkProfileHandler()); 136 network_profile_handler_.reset(new NetworkProfileHandler());
137 network_config_handler_.reset(new NetworkConfigurationHandler()); 137 network_config_handler_.reset(new NetworkConfigurationHandler());
138 managed_config_handler_.reset(new ManagedNetworkConfigurationHandlerImpl()); 138 managed_config_handler_.reset(new ManagedNetworkConfigurationHandlerImpl());
139 client_cert_resolver_.reset(new ClientCertResolver()); 139 client_cert_resolver_.reset(new ClientCertResolver());
140 140
141 network_profile_handler_->Init(); 141 network_profile_handler_->Init();
142 network_config_handler_->Init(network_state_handler_.get()); 142 network_config_handler_->Init(network_state_handler_.get(),
143 NULL /* network_device_handler */);
143 managed_config_handler_->Init(network_state_handler_.get(), 144 managed_config_handler_->Init(network_state_handler_.get(),
144 network_profile_handler_.get(), 145 network_profile_handler_.get(),
145 network_config_handler_.get(), 146 network_config_handler_.get(),
146 NULL /* network_device_handler */); 147 NULL /* network_device_handler */);
147 // Run all notifications before starting the cert loader to reduce run time. 148 // Run all notifications before starting the cert loader to reduce run time.
148 base::RunLoop().RunUntilIdle(); 149 base::RunLoop().RunUntilIdle();
149 150
150 client_cert_resolver_->Init(network_state_handler_.get(), 151 client_cert_resolver_->Init(network_state_handler_.get(),
151 managed_config_handler_.get()); 152 managed_config_handler_.get());
152 client_cert_resolver_->AddObserver(this); 153 client_cert_resolver_->AddObserver(this);
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 302
302 // Verify that the resolver positively matched the pattern in the policy with 303 // Verify that the resolver positively matched the pattern in the policy with
303 // the test client cert and configured the network. 304 // the test client cert and configured the network.
304 std::string pkcs11_id; 305 std::string pkcs11_id;
305 GetClientCertProperties(&pkcs11_id); 306 GetClientCertProperties(&pkcs11_id);
306 EXPECT_EQ(test_cert_id_, pkcs11_id); 307 EXPECT_EQ(test_cert_id_, pkcs11_id);
307 EXPECT_EQ(1, network_properties_changed_count_); 308 EXPECT_EQ(1, network_properties_changed_count_);
308 } 309 }
309 310
310 } // namespace chromeos 311 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/auto_connect_handler_unittest.cc ('k') | chromeos/network/managed_network_configuration_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698