| OLD | NEW |
| 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/location.h" | 7 #include "base/location.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/single_thread_task_runner.h" | 11 #include "base/single_thread_task_runner.h" |
| 11 #include "base/thread_task_runner_handle.h" | 12 #include "base/thread_task_runner_handle.h" |
| 12 #include "content/common/device_sensors/device_motion_hardware_buffer.h" | 13 #include "content/common/device_sensors/device_motion_hardware_buffer.h" |
| 13 #include "content/public/test/test_utils.h" | 14 #include "content/public/test/test_utils.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 15 #include "third_party/WebKit/public/platform/modules/device_orientation/WebDevic
eMotionListener.h" | 16 #include "third_party/WebKit/public/platform/modules/device_orientation/WebDevic
eMotionListener.h" |
| 16 | 17 |
| 17 namespace content { | 18 namespace content { |
| 18 | 19 |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 base::MessageLoop::current()->Run(); | 199 base::MessageLoop::current()->Run(); |
| 199 motion_pump()->Stop(); | 200 motion_pump()->Stop(); |
| 200 | 201 |
| 201 // Check that the blink::WebDeviceMotionListener does not receive excess | 202 // Check that the blink::WebDeviceMotionListener does not receive excess |
| 202 // events. | 203 // events. |
| 203 EXPECT_TRUE(listener()->did_change_device_motion()); | 204 EXPECT_TRUE(listener()->did_change_device_motion()); |
| 204 EXPECT_GE(6, listener()->number_of_events()); | 205 EXPECT_GE(6, listener()->number_of_events()); |
| 205 } | 206 } |
| 206 | 207 |
| 207 } // namespace content | 208 } // namespace content |
| OLD | NEW |