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

Unified Diff: chromeos/network/network_configuration_handler_unittest.cc

Issue 477663004: Merged FakedDBusThreadManager with DBusThreadManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 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 dcc47f0108f219e9cfbacde1c3b423d91eaf25c0..3609b11dcd0c4b1412fb9b6a29ade6fe485ade01 100644
--- a/chromeos/network/network_configuration_handler_unittest.cc
+++ b/chromeos/network/network_configuration_handler_unittest.cc
@@ -8,7 +8,6 @@
#include "base/strings/string_piece.h"
#include "base/values.h"
#include "chromeos/dbus/dbus_thread_manager.h"
-#include "chromeos/dbus/fake_dbus_thread_manager.h"
#include "chromeos/dbus/mock_shill_manager_client.h"
#include "chromeos/dbus/mock_shill_profile_client.h"
#include "chromeos/dbus/mock_shill_service_client.h"
@@ -99,15 +98,16 @@ class NetworkConfigurationHandlerTest : public testing::Test {
virtual ~NetworkConfigurationHandlerTest() {}
virtual void SetUp() OVERRIDE {
- FakeDBusThreadManager* dbus_thread_manager = new FakeDBusThreadManager;
+ scoped_ptr<DBusThreadManagerSetter> dbus_setter =
+ DBusThreadManager::GetSetterForTesting();
mock_manager_client_ = new MockShillManagerClient();
mock_profile_client_ = new MockShillProfileClient();
mock_service_client_ = new MockShillServiceClient();
- dbus_thread_manager->SetShillManagerClient(
+ dbus_setter->SetShillManagerClient(
scoped_ptr<ShillManagerClient>(mock_manager_client_).Pass());
- dbus_thread_manager->SetShillProfileClient(
+ dbus_setter->SetShillProfileClient(
scoped_ptr<ShillProfileClient>(mock_profile_client_).Pass());
- dbus_thread_manager->SetShillServiceClient(
+ dbus_setter->SetShillServiceClient(
scoped_ptr<ShillServiceClient>(mock_service_client_).Pass());
EXPECT_CALL(*mock_service_client_, GetProperties(_, _))
@@ -119,8 +119,6 @@ class NetworkConfigurationHandlerTest : public testing::Test {
EXPECT_CALL(*mock_manager_client_, RemovePropertyChangedObserver(_))
.Times(AnyNumber());
- DBusThreadManager::InitializeForTesting(dbus_thread_manager);
-
network_state_handler_.reset(NetworkStateHandler::InitializeForTest());
network_configuration_handler_.reset(new NetworkConfigurationHandler());
network_configuration_handler_->Init(network_state_handler_.get());
@@ -436,7 +434,7 @@ class NetworkConfigurationHandlerStubTest : public testing::Test {
}
virtual void SetUp() OVERRIDE {
- DBusThreadManager::InitializeWithStub();
+ DBusThreadManager::Initialize();
network_state_handler_.reset(NetworkStateHandler::InitializeForTest());
test_observer_.reset(new TestObserver());
« no previous file with comments | « chromeos/network/network_cert_migrator_unittest.cc ('k') | chromeos/network/network_connection_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698