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

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

Issue 2689223002: Defer NetworkConfigurationHandler::CreateShillConfiguration callback (Closed)
Patch Set: Created 3 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/auto_connect_handler.h" 5 #include "chromeos/network/auto_connect_handler.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 auto_connect_handler_.reset(new AutoConnectHandler()); 133 auto_connect_handler_.reset(new AutoConnectHandler());
134 auto_connect_handler_->Init(client_cert_resolver_.get(), 134 auto_connect_handler_->Init(client_cert_resolver_.get(),
135 nullptr, // no connection handler 135 nullptr, // no connection handler
136 network_state_handler_.get(), 136 network_state_handler_.get(),
137 managed_config_handler_.get()); 137 managed_config_handler_.get());
138 138
139 base::RunLoop().RunUntilIdle(); 139 base::RunLoop().RunUntilIdle();
140 } 140 }
141 141
142 void TearDown() override { 142 void TearDown() override {
143 network_state_handler_->Shutdown();
143 auto_connect_handler_.reset(); 144 auto_connect_handler_.reset();
144 client_cert_resolver_.reset(); 145 client_cert_resolver_.reset();
145 managed_config_handler_.reset(); 146 managed_config_handler_.reset();
146 network_profile_handler_.reset(); 147 network_profile_handler_.reset();
147 network_config_handler_.reset(); 148 network_config_handler_.reset();
148 network_state_handler_.reset(); 149 network_state_handler_.reset();
149 CertLoader::Shutdown(); 150 CertLoader::Shutdown();
150 LoginState::Shutdown(); 151 LoginState::Shutdown();
151 DBusThreadManager::Shutdown(); 152 DBusThreadManager::Shutdown();
152 } 153 }
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 // Applying the user policy after login would usually trigger connecting to 504 // Applying the user policy after login would usually trigger connecting to
504 // the 'best' network. But the manual connect prevents this. 505 // the 'best' network. But the manual connect prevents this.
505 SetupPolicy(std::string(), // no network configs 506 SetupPolicy(std::string(), // no network configs
506 base::DictionaryValue(), // no global config 507 base::DictionaryValue(), // no global config
507 true); // load as user policy 508 true); // load as user policy
508 EXPECT_EQ(shill::kStateOnline, GetServiceState("wifi0")); 509 EXPECT_EQ(shill::kStateOnline, GetServiceState("wifi0"));
509 EXPECT_EQ(shill::kStateIdle, GetServiceState("wifi1")); 510 EXPECT_EQ(shill::kStateIdle, GetServiceState("wifi1"));
510 } 511 }
511 512
512 } // namespace chromeos 513 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/net/network_throttling_observer_unittest.cc ('k') | chromeos/network/client_cert_resolver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698