Index: content/browser/power_monitor_message_broadcaster_unittest.cc |
diff --git a/content/browser/power_monitor_message_broadcaster_unittest.cc b/content/browser/power_monitor_message_broadcaster_unittest.cc |
index 515508266cf812cf6ca10152d64f46a72fe4593f..996c4ec15c68032bfaf02bbc50c2fbd2ede01957 100644 |
--- a/content/browser/power_monitor_message_broadcaster_unittest.cc |
+++ b/content/browser/power_monitor_message_broadcaster_unittest.cc |
@@ -50,17 +50,17 @@ class PowerMonitorMessageBroadcasterTest : public testing::Test { |
protected: |
PowerMonitorMessageBroadcasterTest() { |
power_monitor_source_ = new base::PowerMonitorTestSource(); |
- power_monitor_.reset(new base::PowerMonitor( |
- scoped_ptr<base::PowerMonitorSource>(power_monitor_source_))); |
+ base::PowerMonitor::Initialize( |
+ scoped_ptr<base::PowerMonitorSource>(power_monitor_source_)); |
} |
- virtual ~PowerMonitorMessageBroadcasterTest() {}; |
+ virtual ~PowerMonitorMessageBroadcasterTest() { |
+ base::PowerMonitor::ShutdownForTesting(); |
+ }; |
base::PowerMonitorTestSource* source() { return power_monitor_source_; } |
- base::PowerMonitor* monitor() { return power_monitor_.get(); } |
private: |
base::PowerMonitorTestSource* power_monitor_source_; |
- scoped_ptr<base::PowerMonitor> power_monitor_; |
DISALLOW_COPY_AND_ASSIGN(PowerMonitorMessageBroadcasterTest); |
}; |