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

Unified Diff: content/renderer/device_sensors/device_orientation_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_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,
« no previous file with comments | « content/renderer/device_sensors/device_motion_event_pump_unittest.cc ('k') | content/renderer/devtools/devtools_agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698