| 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 "base/message_loop/message_loop.h" | 5 #include "base/message_loop/message_loop.h" |
| 6 #include "base/run_loop.h" | 6 #include "base/run_loop.h" |
| 7 #include "base/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
| 8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chromeos/dbus/dbus_thread_manager.h" | 10 #include "chromeos/dbus/dbus_thread_manager.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 std::string mac_address = base::StringPrintf( | 45 std::string mac_address = base::StringPrintf( |
| 46 "%02X:%02X:%02X:%02X:%02X:%02X", i, j, 3, 4, 5, 6); | 46 "%02X:%02X:%02X:%02X:%02X:%02X", i, j, 3, 4, 5, 6); |
| 47 std::string channel = base::IntToString(i * 10 + j); | 47 std::string channel = base::IntToString(i * 10 + j); |
| 48 std::string strength = base::IntToString(i * 100 + j); | 48 std::string strength = base::IntToString(i * 100 + j); |
| 49 properties.SetStringWithoutPathExpansion(shill::kGeoMacAddressProperty, | 49 properties.SetStringWithoutPathExpansion(shill::kGeoMacAddressProperty, |
| 50 mac_address); | 50 mac_address); |
| 51 properties.SetStringWithoutPathExpansion(shill::kGeoChannelProperty, | 51 properties.SetStringWithoutPathExpansion(shill::kGeoChannelProperty, |
| 52 channel); | 52 channel); |
| 53 properties.SetStringWithoutPathExpansion( | 53 properties.SetStringWithoutPathExpansion( |
| 54 shill::kGeoSignalStrengthProperty, strength); | 54 shill::kGeoSignalStrengthProperty, strength); |
| 55 manager_test_->AddGeoNetwork(shill::kTypeWifi, properties); | 55 manager_test_->AddGeoNetwork(shill::kGeoWifiAccessPointsProperty, |
| 56 properties); |
| 56 } | 57 } |
| 57 } | 58 } |
| 58 base::RunLoop().RunUntilIdle(); | 59 base::RunLoop().RunUntilIdle(); |
| 59 } | 60 } |
| 60 | 61 |
| 61 base::MessageLoopForUI message_loop_; | 62 base::MessageLoopForUI message_loop_; |
| 62 scoped_refptr<WifiDataProviderChromeOs> provider_; | 63 scoped_refptr<WifiDataProviderChromeOs> provider_; |
| 63 chromeos::ShillManagerClient* manager_client_; | 64 chromeos::ShillManagerClient* manager_client_; |
| 64 chromeos::ShillManagerClient::TestInterface* manager_test_; | 65 chromeos::ShillManagerClient::TestInterface* manager_test_; |
| 65 WifiData::AccessPointDataSet ap_data_; | 66 WifiData::AccessPointDataSet ap_data_; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 89 TEST_F(GeolocationChromeOsWifiDataProviderTest, GetManyAccessPoints) { | 90 TEST_F(GeolocationChromeOsWifiDataProviderTest, GetManyAccessPoints) { |
| 90 base::RunLoop().RunUntilIdle(); | 91 base::RunLoop().RunUntilIdle(); |
| 91 EXPECT_FALSE(GetAccessPointData()); | 92 EXPECT_FALSE(GetAccessPointData()); |
| 92 | 93 |
| 93 AddAccessPoints(3, 4); | 94 AddAccessPoints(3, 4); |
| 94 EXPECT_TRUE(GetAccessPointData()); | 95 EXPECT_TRUE(GetAccessPointData()); |
| 95 ASSERT_EQ(12u, ap_data_.size()); | 96 ASSERT_EQ(12u, ap_data_.size()); |
| 96 } | 97 } |
| 97 | 98 |
| 98 } // namespace device | 99 } // namespace device |
| OLD | NEW |