| 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 c5f4f3a706d17ce1ff6c4dffc467f8dc68b25167..47fc5322fcf59b7fb28b7a9c971eafb72ecf3a98 100644
|
| --- a/chromeos/network/network_configuration_handler_unittest.cc
|
| +++ b/chromeos/network/network_configuration_handler_unittest.cc
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| + // Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| @@ -87,13 +87,12 @@ class NetworkConfigurationHandlerTest : public testing::Test {
|
| mock_service_client_ =
|
| mock_dbus_thread_manager->mock_shill_service_client();
|
|
|
| - // Initialize DBusThreadManager with a stub implementation.
|
| - NetworkConfigurationHandler::Initialize();
|
| + network_configuration_handler_.reset(new NetworkConfigurationHandler());
|
| message_loop_.RunUntilIdle();
|
| }
|
|
|
| virtual void TearDown() OVERRIDE {
|
| - NetworkConfigurationHandler::Shutdown();
|
| + network_configuration_handler_.reset();
|
| DBusThreadManager::Shutdown();
|
| }
|
|
|
| @@ -149,6 +148,7 @@ class NetworkConfigurationHandlerTest : public testing::Test {
|
| protected:
|
| MockShillManagerClient* mock_manager_client_;
|
| MockShillServiceClient* mock_service_client_;
|
| + scoped_ptr<NetworkConfigurationHandler> network_configuration_handler_;
|
| MessageLoop message_loop_;
|
| base::DictionaryValue* dictionary_value_result_;
|
| };
|
| @@ -178,7 +178,7 @@ TEST_F(NetworkConfigurationHandlerTest, GetProperties) {
|
| GetProperties(_, _)).WillOnce(
|
| Invoke(this,
|
| &NetworkConfigurationHandlerTest::OnGetProperties));
|
| - NetworkConfigurationHandler::Get()->GetProperties(
|
| + network_configuration_handler_->GetProperties(
|
| service_path,
|
| base::Bind(&DictionaryValueCallback,
|
| service_path,
|
| @@ -201,7 +201,7 @@ TEST_F(NetworkConfigurationHandlerTest, SetProperties) {
|
| ConfigureService(_, _, _)).WillOnce(
|
| Invoke(this,
|
| &NetworkConfigurationHandlerTest::OnSetProperties));
|
| - NetworkConfigurationHandler::Get()->SetProperties(
|
| + network_configuration_handler_->SetProperties(
|
| service_path,
|
| value,
|
| base::Bind(&base::DoNothing),
|
| @@ -224,7 +224,7 @@ TEST_F(NetworkConfigurationHandlerTest, ClearProperties) {
|
| ConfigureService(_, _, _)).WillOnce(
|
| Invoke(this,
|
| &NetworkConfigurationHandlerTest::OnSetProperties));
|
| - NetworkConfigurationHandler::Get()->SetProperties(
|
| + network_configuration_handler_->SetProperties(
|
| service_path,
|
| value,
|
| base::Bind(&base::DoNothing),
|
| @@ -238,7 +238,7 @@ TEST_F(NetworkConfigurationHandlerTest, ClearProperties) {
|
| ClearProperties(_, _, _, _)).WillOnce(
|
| Invoke(this,
|
| &NetworkConfigurationHandlerTest::OnClearProperties));
|
| - NetworkConfigurationHandler::Get()->ClearProperties(
|
| + network_configuration_handler_->ClearProperties(
|
| service_path,
|
| values_to_clear,
|
| base::Bind(&base::DoNothing),
|
| @@ -261,7 +261,7 @@ TEST_F(NetworkConfigurationHandlerTest, ClearPropertiesError) {
|
| ConfigureService(_, _, _)).WillOnce(
|
| Invoke(this,
|
| &NetworkConfigurationHandlerTest::OnSetProperties));
|
| - NetworkConfigurationHandler::Get()->SetProperties(
|
| + network_configuration_handler_->SetProperties(
|
| service_path,
|
| value,
|
| base::Bind(&base::DoNothing),
|
| @@ -276,7 +276,7 @@ TEST_F(NetworkConfigurationHandlerTest, ClearPropertiesError) {
|
| ClearProperties(_, _, _, _)).WillOnce(
|
| Invoke(this,
|
| &NetworkConfigurationHandlerTest::OnClearPropertiesError));
|
| - NetworkConfigurationHandler::Get()->ClearProperties(
|
| + network_configuration_handler_->ClearProperties(
|
| service_path,
|
| values_to_clear,
|
| base::Bind(&base::DoNothing),
|
| @@ -298,7 +298,7 @@ TEST_F(NetworkConfigurationHandlerTest, CreateConfiguration) {
|
| GetService(_, _, _)).WillOnce(
|
| Invoke(this,
|
| &NetworkConfigurationHandlerTest::OnGetService));
|
| - NetworkConfigurationHandler::Get()->CreateConfiguration(
|
| + network_configuration_handler_->CreateConfiguration(
|
| value,
|
| base::Bind(&StringResultCallback, std::string("/service/2")),
|
| base::Bind(&ErrorCallback, false, std::string("")));
|
| @@ -313,7 +313,7 @@ TEST_F(NetworkConfigurationHandlerTest, RemoveConfiguration) {
|
| Remove(_, _, _)).WillOnce(
|
| Invoke(this,
|
| &NetworkConfigurationHandlerTest::OnRemove));
|
| - NetworkConfigurationHandler::Get()->RemoveConfiguration(
|
| + network_configuration_handler_->RemoveConfiguration(
|
| service_path,
|
| base::Bind(&base::DoNothing),
|
| base::Bind(&ErrorCallback, false, service_path));
|
|
|