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

Unified Diff: base/timer/hi_res_timer_manager_unittest.cc

Issue 2951413003: Add UMA for High Resolution Timer Usage (Closed)
Patch Set: Removed NaCl changes Created 3 years, 5 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 | « base/timer/hi_res_timer_manager_posix.cc ('k') | base/timer/hi_res_timer_manager_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..43f607adb7ee9759552d598656fccfe34e95dc4e 100644
--- a/base/timer/hi_res_timer_manager_unittest.cc
+++ b/base/timer/hi_res_timer_manager_unittest.cc
@@ -7,9 +7,9 @@
#include <memory>
#include <utility>
-#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_environment.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -21,7 +21,8 @@ TEST(HiResTimerManagerTest, ToggleOnOff) {
// The power monitor creates Window to receive power notifications from
// 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);
+ test::ScopedTaskEnvironment scoped_task_environment(
+ test::ScopedTaskEnvironment::MainThreadType::UI);
std::unique_ptr<base::PowerMonitorSource> power_monitor_source(
new base::PowerMonitorDeviceSource());
std::unique_ptr<base::PowerMonitor> power_monitor(
« no previous file with comments | « base/timer/hi_res_timer_manager_posix.cc ('k') | base/timer/hi_res_timer_manager_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698