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

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

Issue 446603002: Refactor code listening to platform events in content/renderer/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webkitplatform_impl_start_stop
Patch Set: rebase Created 6 years, 4 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 17636d00b21f3dc2193d4c23d2852e327960d0ae..038870b99b3a5e3667598c780ef849629409c474 100644
--- a/content/renderer/device_sensors/device_motion_event_pump_unittest.cc
+++ b/content/renderer/device_sensors/device_motion_event_pump_unittest.cc
@@ -43,14 +43,15 @@ class MockDeviceMotionListener : public blink::WebDeviceMotionListener {
class DeviceMotionEventPumpForTesting : public DeviceMotionEventPump {
public:
- DeviceMotionEventPumpForTesting() { }
+ DeviceMotionEventPumpForTesting()
+ : DeviceMotionEventPump(0) { }
virtual ~DeviceMotionEventPumpForTesting() { }
void OnDidStart(base::SharedMemoryHandle renderer_handle) {
DeviceMotionEventPump::OnDidStart(renderer_handle);
}
- virtual bool SendStartMessage() OVERRIDE { return true; }
- virtual bool SendStopMessage() OVERRIDE { return true; }
+ virtual void SendStartMessage() OVERRIDE { }
+ virtual void SendStopMessage() OVERRIDE { }
virtual void FireEvent() OVERRIDE {
DeviceMotionEventPump::FireEvent();
Stop();
@@ -110,7 +111,7 @@ TEST_F(DeviceMotionEventPumpTest, DidStartPolling) {
InitBuffer(true);
- motion_pump()->SetListener(listener());
+ motion_pump()->Start(listener());
motion_pump()->OnDidStart(handle());
base::MessageLoop::current()->Run();
@@ -137,7 +138,7 @@ TEST_F(DeviceMotionEventPumpTest, DidStartPollingNotAllSensorsActive) {
InitBuffer(false);
- motion_pump()->SetListener(listener());
+ motion_pump()->Start(listener());
motion_pump()->OnDidStart(handle());
base::MessageLoop::current()->Run();

Powered by Google App Engine
This is Rietveld 408576698