OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/geolocation/gps_location_provider_linux.h" | 5 #include "content/browser/geolocation/gps_location_provider_linux.h" |
6 #include "content/browser/geolocation/libgps_wrapper_linux.h" | 6 #include "content/browser/geolocation/libgps_wrapper_linux.h" |
7 #include "content/test/test_browser_thread.h" | 7 #include "content/test/test_browser_thread.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 | 9 |
| 10 using content::BrowserThread; |
| 11 |
10 struct gps_data_t { | 12 struct gps_data_t { |
11 }; | 13 }; |
12 | 14 |
13 namespace { | 15 namespace { |
14 class MockLibGps : public LibGps { | 16 class MockLibGps : public LibGps { |
15 public: | 17 public: |
16 MockLibGps(); | 18 MockLibGps(); |
17 ~MockLibGps(); | 19 ~MockLibGps(); |
18 | 20 |
19 virtual bool StartStreaming() { | 21 virtual bool StartStreaming() { |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 EXPECT_EQ(2, MockLibGps::g_instance_->get_position_calls_); | 182 EXPECT_EQ(2, MockLibGps::g_instance_->get_position_calls_); |
181 CheckValidPosition(MockLibGps::g_instance_->get_position_, position); | 183 CheckValidPosition(MockLibGps::g_instance_->get_position_, position); |
182 } | 184 } |
183 | 185 |
184 // TODO(joth): Add a test for LibGps::Start() returning false (i.e. gpsd not | 186 // TODO(joth): Add a test for LibGps::Start() returning false (i.e. gpsd not |
185 // running). Need to work around the 10s reconnect delay (either by injecting | 187 // running). Need to work around the 10s reconnect delay (either by injecting |
186 // a shorter retry interval, or adapt MessageLoop / Time::Now to be more test | 188 // a shorter retry interval, or adapt MessageLoop / Time::Now to be more test |
187 // friendly). | 189 // friendly). |
188 | 190 |
189 } // namespace | 191 } // namespace |
OLD | NEW |