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

Unified Diff: base/timer/hi_res_timer_manager_unittest.cc

Issue 2951413003: Add UMA for High Resolution Timer Usage (Closed)
Patch Set: Added suspend / resume logic Created 3 years, 6 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: base/timer/hi_res_timer_manager_unittest.cc
diff --git a/base/timer/hi_res_timer_manager_unittest.cc b/base/timer/hi_res_timer_manager_unittest.cc
index a0b0f9350ce2efc72303e49392c02870a20a14cf..18dd002b2dabe47a63a0f17f004d26ef4c7b3357 100644
--- a/base/timer/hi_res_timer_manager_unittest.cc
+++ b/base/timer/hi_res_timer_manager_unittest.cc
@@ -10,6 +10,7 @@
#include "base/message_loop/message_loop.h"
#include "base/power_monitor/power_monitor.h"
#include "base/power_monitor/power_monitor_device_source.h"
+#include "base/test/scoped_task_scheduler.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -22,6 +23,8 @@ TEST(HiResTimerManagerTest, ToggleOnOff) {
// Windows, which makes this test flaky if you run while the machine
// goes in or out of AC power.
base::MessageLoop loop(base::MessageLoop::TYPE_UI);
+ // Needed for HighResolutionTimerManager.
+ base::test::ScopedTaskScheduler task_scheduler(&loop);
gab 2017/06/28 16:39:33 ScopedTaskScheduler is deprecated. Please replace
stanisc 2017/06/28 22:28:35 Done.
std::unique_ptr<base::PowerMonitorSource> power_monitor_source(
new base::PowerMonitorDeviceSource());
std::unique_ptr<base::PowerMonitor> power_monitor(

Powered by Google App Engine
This is Rietveld 408576698