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

Unified Diff: chromeos/dbus/power_policy_controller_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
« no previous file with comments | « chromeos/dbus/fake_shill_manager_client.cc ('k') | chromeos/disks/disk_mount_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/power_policy_controller_unittest.cc
diff --git a/chromeos/dbus/power_policy_controller_unittest.cc b/chromeos/dbus/power_policy_controller_unittest.cc
index b4e7bf4422051c81dc95f4e362e0580a87bce533..755cc53699c93b6f6eff34311298afa0b1b0ef95 100644
--- a/chromeos/dbus/power_policy_controller_unittest.cc
+++ b/chromeos/dbus/power_policy_controller_unittest.cc
@@ -5,8 +5,8 @@
#include "chromeos/dbus/power_policy_controller.h"
#include "base/memory/scoped_ptr.h"
+#include "base/message_loop/message_loop.h"
#include "chromeos/dbus/dbus_thread_manager.h"
-#include "chromeos/dbus/fake_dbus_thread_manager.h"
#include "chromeos/dbus/fake_power_manager_client.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -22,14 +22,14 @@ class PowerPolicyControllerTest : public testing::Test {
virtual ~PowerPolicyControllerTest() {}
virtual void SetUp() OVERRIDE {
- dbus_manager_ = new FakeDBusThreadManager;
+ scoped_ptr<DBusThreadManagerSetter> dbus_setter =
+ chromeos::DBusThreadManager::GetSetterForTesting();
fake_power_client_ = new FakePowerManagerClient;
- dbus_manager_->SetPowerManagerClient(
+ dbus_setter->SetPowerManagerClient(
scoped_ptr<PowerManagerClient>(fake_power_client_));
- DBusThreadManager::InitializeForTesting(dbus_manager_); // Takes ownership.
policy_controller_.reset(new PowerPolicyController);
- policy_controller_->Init(dbus_manager_);
+ policy_controller_->Init(DBusThreadManager::Get());
}
virtual void TearDown() OVERRIDE {
@@ -38,9 +38,9 @@ class PowerPolicyControllerTest : public testing::Test {
}
protected:
- FakeDBusThreadManager* dbus_manager_; // Not owned.
FakePowerManagerClient* fake_power_client_;
scoped_ptr<PowerPolicyController> policy_controller_;
+ base::MessageLoop message_loop_;
};
TEST_F(PowerPolicyControllerTest, Prefs) {
« no previous file with comments | « chromeos/dbus/fake_shill_manager_client.cc ('k') | chromeos/disks/disk_mount_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698