OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/geolocation/wifi_data_provider_common.h" | 5 #include "chrome/browser/geolocation/wifi_data_provider_common.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
11 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" | 11 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" |
| 12 #include "base/utf_string_conversions.h" |
12 #include "testing/gmock/include/gmock/gmock.h" | 13 #include "testing/gmock/include/gmock/gmock.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
14 | 15 |
15 using testing::_; | 16 using testing::_; |
16 using testing::AtLeast; | 17 using testing::AtLeast; |
17 using testing::DoDefault; | 18 using testing::DoDefault; |
18 using testing::Invoke; | 19 using testing::Invoke; |
19 using testing::Return; | 20 using testing::Return; |
20 | 21 |
21 class MockWlanApi : public WifiDataProviderCommon::WlanApiInterface { | 22 class MockWlanApi : public WifiDataProviderCommon::WlanApiInterface { |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 // TODO(Joth) Convert to gmock style | 219 // TODO(Joth) Convert to gmock style |
219 TEST_F(GeolocationWifiDataProviderCommonTest, | 220 TEST_F(GeolocationWifiDataProviderCommonTest, |
220 StartThreadViaDeviceDataProvider) { | 221 StartThreadViaDeviceDataProvider) { |
221 MessageLoopQuitListener quit_listener(&main_message_loop_); | 222 MessageLoopQuitListener quit_listener(&main_message_loop_); |
222 WifiDataProvider::SetFactory(CreateWifiDataProviderCommonWithMock); | 223 WifiDataProvider::SetFactory(CreateWifiDataProviderCommonWithMock); |
223 DeviceDataProvider<WifiData>::Register(&quit_listener); | 224 DeviceDataProvider<WifiData>::Register(&quit_listener); |
224 main_message_loop_.Run(); | 225 main_message_loop_.Run(); |
225 DeviceDataProvider<WifiData>::Unregister(&quit_listener); | 226 DeviceDataProvider<WifiData>::Unregister(&quit_listener); |
226 DeviceDataProvider<WifiData>::ResetFactory(); | 227 DeviceDataProvider<WifiData>::ResetFactory(); |
227 } | 228 } |
OLD | NEW |