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 "content/browser/device_sensors/sensor_manager_android.h" | 5 #include "device/device_sensors/sensor_manager_android.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "content/browser/device_sensors/inertial_sensor_consts.h" | 10 #include "device/device_sensors/inertial_sensor_consts.h" |
11 #include "content/public/test/test_browser_thread_bundle.h" | 11 //#include "content/public/test/test_browser_thread_bundle.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 class FakeSensorManagerAndroid : public SensorManagerAndroid { | 18 class FakeSensorManagerAndroid : public SensorManagerAndroid { |
19 public: | 19 public: |
20 FakeSensorManagerAndroid() {} | 20 FakeSensorManagerAndroid() {} |
21 ~FakeSensorManagerAndroid() override {} | 21 ~FakeSensorManagerAndroid() override {} |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 sensorManager.GotLight(0, 0, 100); | 155 sensorManager.GotLight(0, 0, 100); |
156 ASSERT_EQ(100, light_buffer_->data.value); | 156 ASSERT_EQ(100, light_buffer_->data.value); |
157 | 157 |
158 sensorManager.StopFetchingDeviceLightData(); | 158 sensorManager.StopFetchingDeviceLightData(); |
159 ASSERT_EQ(-1, light_buffer_->data.value); | 159 ASSERT_EQ(-1, light_buffer_->data.value); |
160 } | 160 } |
161 | 161 |
162 } // namespace | 162 } // namespace |
163 | 163 |
164 } // namespace content | 164 } // namespace content |
OLD | NEW |