OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_orientation/data_fetcher_impl_android.h" | 5 #include "content/browser/device_orientation/data_fetcher_impl_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 "base/process_util.h" | |
11 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
12 | 11 |
13 namespace content { | 12 namespace content { |
14 | 13 |
15 namespace { | 14 namespace { |
16 | 15 |
17 const int kPeriodInMilliseconds = 100; | 16 const int kPeriodInMilliseconds = 100; |
18 | 17 |
19 class FakeDataFetcherImplAndroid : public DataFetcherImplAndroid { | 18 class FakeDataFetcherImplAndroid : public DataFetcherImplAndroid { |
20 public: | 19 public: |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 ASSERT_TRUE(buffer_->data.allAvailableSensorsAreActive); | 98 ASSERT_TRUE(buffer_->data.allAvailableSensorsAreActive); |
100 ASSERT_EQ(kPeriodInMilliseconds, buffer_->data.interval); | 99 ASSERT_EQ(kPeriodInMilliseconds, buffer_->data.interval); |
101 | 100 |
102 fetcher.StopFetchingDeviceMotionData(); | 101 fetcher.StopFetchingDeviceMotionData(); |
103 ASSERT_FALSE(buffer_->data.allAvailableSensorsAreActive); | 102 ASSERT_FALSE(buffer_->data.allAvailableSensorsAreActive); |
104 } | 103 } |
105 | 104 |
106 } // namespace | 105 } // namespace |
107 | 106 |
108 } // namespace content | 107 } // namespace content |
OLD | NEW |