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

Unified Diff: content/renderer/device_sensors/device_motion_event_pump_unittest.cc

Issue 2082343002: Remove calls to deprecated MessageLoop methods in content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CR Created 4 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: content/renderer/device_sensors/device_motion_event_pump_unittest.cc
diff --git a/content/renderer/device_sensors/device_motion_event_pump_unittest.cc b/content/renderer/device_sensors/device_motion_event_pump_unittest.cc
index bdba6c1688af91306375e5f4e0163d41d8c3985d..d1b8be01458126cf1793558366c11edf8e859560 100644
--- a/content/renderer/device_sensors/device_motion_event_pump_unittest.cc
+++ b/content/renderer/device_sensors/device_motion_event_pump_unittest.cc
@@ -11,6 +11,7 @@
#include "base/location.h"
#include "base/logging.h"
#include "base/macros.h"
+#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
#include "content/common/device_sensors/device_motion_hardware_buffer.h"
@@ -137,7 +138,7 @@ TEST_F(DeviceMotionEventPumpTest, DidStartPolling) {
motion_pump()->Start(listener());
motion_pump()->OnDidStart(handle());
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
const blink::WebDeviceMotionData& received_data = listener()->data();
EXPECT_TRUE(listener()->did_change_device_motion());
@@ -164,7 +165,7 @@ TEST_F(DeviceMotionEventPumpTest, DidStartPollingNotAllSensorsActive) {
motion_pump()->Start(listener());
motion_pump()->OnDidStart(handle());
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
const blink::WebDeviceMotionData& received_data = listener()->data();
// No change in device motion because allAvailableSensorsAreActive is false.
@@ -199,7 +200,7 @@ TEST_F(DeviceMotionEventPumpTest, PumpThrottlesEventRate) {
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE, base::MessageLoop::QuitWhenIdleClosure(),
base::TimeDelta::FromMilliseconds(100));
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
motion_pump()->Stop();
// Check that the blink::WebDeviceMotionListener does not receive excess

Powered by Google App Engine
This is Rietveld 408576698