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

Side by Side Diff: content/renderer/device_sensors/device_motion_event_pump_unittest.cc

Issue 670683003: Standardize usage of virtual/override/final in content/renderer/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "device_motion_event_pump.h" 5 #include "device_motion_event_pump.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "content/common/device_sensors/device_motion_hardware_buffer.h" 10 #include "content/common/device_sensors/device_motion_hardware_buffer.h"
(...skipping 27 matching lines...) Expand all
38 bool did_change_device_motion_; 38 bool did_change_device_motion_;
39 blink::WebDeviceMotionData data_; 39 blink::WebDeviceMotionData data_;
40 40
41 DISALLOW_COPY_AND_ASSIGN(MockDeviceMotionListener); 41 DISALLOW_COPY_AND_ASSIGN(MockDeviceMotionListener);
42 }; 42 };
43 43
44 class DeviceMotionEventPumpForTesting : public DeviceMotionEventPump { 44 class DeviceMotionEventPumpForTesting : public DeviceMotionEventPump {
45 public: 45 public:
46 DeviceMotionEventPumpForTesting() 46 DeviceMotionEventPumpForTesting()
47 : DeviceMotionEventPump(0) { } 47 : DeviceMotionEventPump(0) { }
48 virtual ~DeviceMotionEventPumpForTesting() { } 48 ~DeviceMotionEventPumpForTesting() override {}
49 49
50 void OnDidStart(base::SharedMemoryHandle renderer_handle) { 50 void OnDidStart(base::SharedMemoryHandle renderer_handle) {
51 DeviceMotionEventPump::OnDidStart(renderer_handle); 51 DeviceMotionEventPump::OnDidStart(renderer_handle);
52 } 52 }
53 virtual void SendStartMessage() override { } 53 void SendStartMessage() override {}
54 virtual void SendStopMessage() override { } 54 void SendStopMessage() override {}
55 virtual void FireEvent() override { 55 void FireEvent() override {
56 DeviceMotionEventPump::FireEvent(); 56 DeviceMotionEventPump::FireEvent();
57 Stop(); 57 Stop();
58 base::MessageLoop::current()->QuitWhenIdle(); 58 base::MessageLoop::current()->QuitWhenIdle();
59 } 59 }
60 60
61 private: 61 private:
62 DISALLOW_COPY_AND_ASSIGN(DeviceMotionEventPumpForTesting); 62 DISALLOW_COPY_AND_ASSIGN(DeviceMotionEventPumpForTesting);
63 }; 63 };
64 64
65 class DeviceMotionEventPumpTest : public testing::Test { 65 class DeviceMotionEventPumpTest : public testing::Test {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 EXPECT_FALSE(received_data.hasAccelerationZ); 152 EXPECT_FALSE(received_data.hasAccelerationZ);
153 EXPECT_FALSE(received_data.hasAccelerationIncludingGravityX); 153 EXPECT_FALSE(received_data.hasAccelerationIncludingGravityX);
154 EXPECT_FALSE(received_data.hasAccelerationIncludingGravityY); 154 EXPECT_FALSE(received_data.hasAccelerationIncludingGravityY);
155 EXPECT_FALSE(received_data.hasAccelerationIncludingGravityZ); 155 EXPECT_FALSE(received_data.hasAccelerationIncludingGravityZ);
156 EXPECT_FALSE(received_data.hasRotationRateAlpha); 156 EXPECT_FALSE(received_data.hasRotationRateAlpha);
157 EXPECT_FALSE(received_data.hasRotationRateBeta); 157 EXPECT_FALSE(received_data.hasRotationRateBeta);
158 EXPECT_FALSE(received_data.hasRotationRateGamma); 158 EXPECT_FALSE(received_data.hasRotationRateGamma);
159 } 159 }
160 160
161 } // namespace content 161 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698