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

Unified Diff: content/renderer/device_sensors/device_light_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: apply review comments 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_light_event_pump_unittest.cc
diff --git a/content/renderer/device_sensors/device_light_event_pump_unittest.cc b/content/renderer/device_sensors/device_light_event_pump_unittest.cc
index 08182f7b1b48e5433f7f63cacb6c17e9f1214e0f..20a9e29b774d5f3413d73189ba07ea4fac6869ce 100644
--- a/content/renderer/device_sensors/device_light_event_pump_unittest.cc
+++ b/content/renderer/device_sensors/device_light_event_pump_unittest.cc
@@ -39,14 +39,15 @@ class MockDeviceLightListener : public blink::WebDeviceLightListener {
class DeviceLightEventPumpForTesting : public DeviceLightEventPump {
public:
- DeviceLightEventPumpForTesting() {}
+ DeviceLightEventPumpForTesting()
+ : DeviceLightEventPump(0) {}
virtual ~DeviceLightEventPumpForTesting() {}
void OnDidStart(base::SharedMemoryHandle renderer_handle) {
DeviceLightEventPump::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 {
DeviceLightEventPump::FireEvent();
Stop();
@@ -100,7 +101,7 @@ TEST_F(DeviceLightEventPumpTest, DidStartPolling) {
InitBuffer();
- light_pump()->SetListener(listener());
+ light_pump()->Start(listener());
light_pump()->OnDidStart(handle());
base::MessageLoop::current()->Run();
@@ -115,7 +116,7 @@ TEST_F(DeviceLightEventPumpTest, DidStartPollingValuesEqual) {
InitBuffer();
- light_pump()->SetListener(listener());
+ light_pump()->Start(listener());
light_pump()->OnDidStart(handle());
base::MessageLoop::current()->Run();

Powered by Google App Engine
This is Rietveld 408576698