Index: content/child/power_monitor_broadcast_source_unittest.cc |
diff --git a/content/child/power_monitor_broadcast_source_unittest.cc b/content/child/power_monitor_broadcast_source_unittest.cc |
index b665e90bbb05a4494e2782ec78f261e3c2edebad..5b472afdee2f724df3a3bd60ce0540bc4115a3cc 100644 |
--- a/content/child/power_monitor_broadcast_source_unittest.cc |
+++ b/content/child/power_monitor_broadcast_source_unittest.cc |
@@ -14,19 +14,19 @@ class PowerMonitorBroadcastSourceTest : public testing::Test { |
protected: |
PowerMonitorBroadcastSourceTest() { |
power_monitor_source_ = new PowerMonitorBroadcastSource(); |
- power_monitor_.reset(new base::PowerMonitor( |
- scoped_ptr<base::PowerMonitorSource>(power_monitor_source_))); |
+ base::PowerMonitor::Initialize( |
+ scoped_ptr<base::PowerMonitorSource>(power_monitor_source_)); |
+ } |
+ virtual ~PowerMonitorBroadcastSourceTest() { |
+ base::PowerMonitor::ShutdownForTesting(); |
} |
- virtual ~PowerMonitorBroadcastSourceTest() {} |
PowerMonitorBroadcastSource* source() { return power_monitor_source_; } |
- base::PowerMonitor* monitor() { return power_monitor_.get(); } |
base::MessageLoop message_loop_; |
private: |
PowerMonitorBroadcastSource* power_monitor_source_; |
- scoped_ptr<base::PowerMonitor> power_monitor_; |
DISALLOW_COPY_AND_ASSIGN(PowerMonitorBroadcastSourceTest); |
}; |
@@ -36,7 +36,7 @@ TEST_F(PowerMonitorBroadcastSourceTest, PowerMessageReceiveBroadcast) { |
source()->GetMessageFilter(); |
base::PowerMonitorTestObserver observer; |
- monitor()->AddObserver(&observer); |
+ base::PowerMonitor::AddObserver(&observer); |
PowerMonitorMsg_Suspend suspend_msg; |
PowerMonitorMsg_Resume resume_msg; |