| 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/strings/stringprintf.h" | 6 #include "base/strings/stringprintf.h" |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "chromeos/dbus/dbus_thread_manager.h" | 8 #include "chromeos/dbus/dbus_thread_manager.h" |
| 9 #include "chromeos/dbus/shill_manager_client.h" | 9 #include "chromeos/dbus/shill_manager_client.h" |
| 10 #include "chromeos/network/geolocation_handler.h" | 10 #include "chromeos/network/geolocation_handler.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 EXPECT_EQ(0u, ap_data_.size()); | 77 EXPECT_EQ(0u, ap_data_.size()); |
| 78 } | 78 } |
| 79 | 79 |
| 80 TEST_F(GeolocationChromeOsWifiDataProviderTest, GetOneAccessPoint) { | 80 TEST_F(GeolocationChromeOsWifiDataProviderTest, GetOneAccessPoint) { |
| 81 message_loop_.RunUntilIdle(); | 81 message_loop_.RunUntilIdle(); |
| 82 EXPECT_FALSE(GetAccessPointData()); | 82 EXPECT_FALSE(GetAccessPointData()); |
| 83 | 83 |
| 84 AddAccessPoints(1, 1); | 84 AddAccessPoints(1, 1); |
| 85 EXPECT_TRUE(GetAccessPointData()); | 85 EXPECT_TRUE(GetAccessPointData()); |
| 86 ASSERT_EQ(1u, ap_data_.size()); | 86 ASSERT_EQ(1u, ap_data_.size()); |
| 87 EXPECT_EQ("00:00:03:04:05:06", UTF16ToUTF8(ap_data_.begin()->mac_address)); | 87 EXPECT_EQ("00:00:03:04:05:06", |
| 88 base::UTF16ToUTF8(ap_data_.begin()->mac_address)); |
| 88 } | 89 } |
| 89 | 90 |
| 90 TEST_F(GeolocationChromeOsWifiDataProviderTest, GetManyAccessPoints) { | 91 TEST_F(GeolocationChromeOsWifiDataProviderTest, GetManyAccessPoints) { |
| 91 message_loop_.RunUntilIdle(); | 92 message_loop_.RunUntilIdle(); |
| 92 EXPECT_FALSE(GetAccessPointData()); | 93 EXPECT_FALSE(GetAccessPointData()); |
| 93 | 94 |
| 94 AddAccessPoints(3, 4); | 95 AddAccessPoints(3, 4); |
| 95 EXPECT_TRUE(GetAccessPointData()); | 96 EXPECT_TRUE(GetAccessPointData()); |
| 96 ASSERT_EQ(12u, ap_data_.size()); | 97 ASSERT_EQ(12u, ap_data_.size()); |
| 97 } | 98 } |
| 98 | 99 |
| 99 } // namespace content | 100 } // namespace content |
| OLD | NEW |