OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/wifi_data_provider_linux.h" | 5 #include "content/browser/geolocation/wifi_data_provider_linux.h" |
6 | 6 |
7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 | 215 |
216 TEST_F(GeolocationWifiDataProviderLinuxTest, GetAccessPointData) { | 216 TEST_F(GeolocationWifiDataProviderLinuxTest, GetAccessPointData) { |
217 WifiData::AccessPointDataSet access_point_data_set; | 217 WifiData::AccessPointDataSet access_point_data_set; |
218 ASSERT_TRUE(wlan_api_->GetAccessPointData(&access_point_data_set)); | 218 ASSERT_TRUE(wlan_api_->GetAccessPointData(&access_point_data_set)); |
219 | 219 |
220 ASSERT_EQ(1U, access_point_data_set.size()); | 220 ASSERT_EQ(1U, access_point_data_set.size()); |
221 AccessPointData access_point_data = *access_point_data_set.begin(); | 221 AccessPointData access_point_data = *access_point_data_set.begin(); |
222 | 222 |
223 // Check the contents of the access point data. | 223 // Check the contents of the access point data. |
224 // The expected values come from CreateAccessPointProxyResponse() above. | 224 // The expected values come from CreateAccessPointProxyResponse() above. |
225 EXPECT_EQ("test", UTF16ToUTF8(access_point_data.ssid)); | 225 EXPECT_EQ("test", base::UTF16ToUTF8(access_point_data.ssid)); |
226 EXPECT_EQ("00-11-22-33-44-55", UTF16ToUTF8(access_point_data.mac_address)); | 226 EXPECT_EQ("00-11-22-33-44-55", |
| 227 base::UTF16ToUTF8(access_point_data.mac_address)); |
227 EXPECT_EQ(-50, access_point_data.radio_signal_strength); | 228 EXPECT_EQ(-50, access_point_data.radio_signal_strength); |
228 EXPECT_EQ(4, access_point_data.channel); | 229 EXPECT_EQ(4, access_point_data.channel); |
229 } | 230 } |
230 | 231 |
231 } // namespace content | 232 } // namespace content |
OLD | NEW |