Index: content/renderer/device_sensors/device_orientation_event_pump_unittest.cc |
diff --git a/content/renderer/device_sensors/device_orientation_event_pump_unittest.cc b/content/renderer/device_sensors/device_orientation_event_pump_unittest.cc |
index 141f8faabf40319b032481dc9aec45fa0b5d5df5..673ad08e466c55dfb6f1a1d60625c077ab8b8a5f 100644 |
--- a/content/renderer/device_sensors/device_orientation_event_pump_unittest.cc |
+++ b/content/renderer/device_sensors/device_orientation_event_pump_unittest.cc |
@@ -9,6 +9,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_orientation_hardware_buffer.h" |
@@ -130,7 +131,7 @@ TEST_F(DeviceOrientationEventPumpTest, DidStartPolling) { |
orientation_pump()->Start(listener()); |
orientation_pump()->OnDidStart(handle()); |
- base::MessageLoop::current()->Run(); |
+ base::RunLoop().Run(); |
const blink::WebDeviceOrientationData& received_data = listener()->data(); |
EXPECT_TRUE(listener()->did_change_device_orientation()); |
@@ -150,7 +151,7 @@ TEST_F(DeviceOrientationEventPumpTest, FireAllNullEvent) { |
orientation_pump()->Start(listener()); |
orientation_pump()->OnDidStart(handle()); |
- base::MessageLoop::current()->Run(); |
+ base::RunLoop().Run(); |
const blink::WebDeviceOrientationData& received_data = listener()->data(); |
EXPECT_TRUE(listener()->did_change_device_orientation()); |
@@ -167,7 +168,7 @@ TEST_F(DeviceOrientationEventPumpTest, UpdateRespectsOrientationThreshold) { |
orientation_pump()->Start(listener()); |
orientation_pump()->OnDidStart(handle()); |
- base::MessageLoop::current()->Run(); |
+ base::RunLoop().Run(); |
const blink::WebDeviceOrientationData& received_data = listener()->data(); |
EXPECT_TRUE(listener()->did_change_device_orientation()); |
@@ -189,7 +190,7 @@ TEST_F(DeviceOrientationEventPumpTest, UpdateRespectsOrientationThreshold) { |
base::ThreadTaskRunnerHandle::Get()->PostTask( |
FROM_HERE, base::Bind(&DeviceOrientationEventPumpForTesting::FireEvent, |
base::Unretained(orientation_pump()))); |
- base::MessageLoop::current()->Run(); |
+ base::RunLoop().Run(); |
EXPECT_FALSE(listener()->did_change_device_orientation()); |
EXPECT_TRUE(received_data.allAvailableSensorsAreActive); |
@@ -210,7 +211,7 @@ TEST_F(DeviceOrientationEventPumpTest, UpdateRespectsOrientationThreshold) { |
base::ThreadTaskRunnerHandle::Get()->PostTask( |
FROM_HERE, base::Bind(&DeviceOrientationEventPumpForTesting::FireEvent, |
base::Unretained(orientation_pump()))); |
- base::MessageLoop::current()->Run(); |
+ base::RunLoop().Run(); |
EXPECT_TRUE(listener()->did_change_device_orientation()); |
EXPECT_EQ(1 + DeviceOrientationEventPump::kOrientationThreshold, |