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

Unified Diff: chromeos/network/network_configuration_handler_unittest.cc

Issue 2478573003: NetworkStateHandler::InitializeForTest() should return a std::unique_ptr. (Closed)
Patch Set: Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chromeos/network/network_configuration_handler_unittest.cc
diff --git a/chromeos/network/network_configuration_handler_unittest.cc b/chromeos/network/network_configuration_handler_unittest.cc
index 6f14b7f40f2f63ec9e84cfd98c9257b436dc0795..2d17364c959a8e4bd46bb2e8652941141befb013 100644
--- a/chromeos/network/network_configuration_handler_unittest.cc
+++ b/chromeos/network/network_configuration_handler_unittest.cc
@@ -200,7 +200,7 @@ class NetworkConfigurationHandlerTest : public testing::Test {
EXPECT_CALL(*mock_manager_client_, RemovePropertyChangedObserver(_))
.Times(AnyNumber());
- network_state_handler_.reset(NetworkStateHandler::InitializeForTest());
+ network_state_handler_ = NetworkStateHandler::InitializeForTest();
network_configuration_handler_.reset(new NetworkConfigurationHandler());
network_configuration_handler_->Init(network_state_handler_.get(),
NULL /* network_device_handler */);
@@ -495,7 +495,7 @@ class NetworkConfigurationHandlerStubTest : public testing::Test {
void SetUp() override {
DBusThreadManager::Initialize();
- network_state_handler_.reset(NetworkStateHandler::InitializeForTest());
+ network_state_handler_ = NetworkStateHandler::InitializeForTest();
test_observer_.reset(new TestObserver());
network_state_handler_->AddObserver(test_observer_.get(), FROM_HERE);

Powered by Google App Engine
This is Rietveld 408576698