Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Side by Side Diff: content/browser/geolocation/wifi_data_provider_chromeos_unittest.cc

Issue 14335017: content: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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.h" 5 #include "base/message_loop.h"
6 #include "base/stringprintf.h" 6 #include "base/stringprintf.h"
7 #include "base/utf_string_conversions.h" 7 #include "base/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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 properties.SetStringWithoutPathExpansion( 53 properties.SetStringWithoutPathExpansion(
54 shill::kGeoChannelProperty, channel); 54 shill::kGeoChannelProperty, channel);
55 properties.SetStringWithoutPathExpansion( 55 properties.SetStringWithoutPathExpansion(
56 shill::kGeoSignalStrengthProperty, strength); 56 shill::kGeoSignalStrengthProperty, strength);
57 manager_test_->AddGeoNetwork(flimflam::kTypeWifi, properties); 57 manager_test_->AddGeoNetwork(flimflam::kTypeWifi, properties);
58 } 58 }
59 } 59 }
60 message_loop_.RunUntilIdle(); 60 message_loop_.RunUntilIdle();
61 } 61 }
62 62
63 MessageLoopForUI message_loop_; 63 base::MessageLoopForUI message_loop_;
64 scoped_refptr<WifiDataProviderChromeOs> provider_; 64 scoped_refptr<WifiDataProviderChromeOs> provider_;
65 chromeos::ShillManagerClient* manager_client_; 65 chromeos::ShillManagerClient* manager_client_;
66 chromeos::ShillManagerClient::TestInterface* manager_test_; 66 chromeos::ShillManagerClient::TestInterface* manager_test_;
67 WifiData::AccessPointDataSet ap_data_; 67 WifiData::AccessPointDataSet ap_data_;
68 }; 68 };
69 69
70 TEST_F(GeolocationChromeOsWifiDataProviderTest, NoAccessPoints) { 70 TEST_F(GeolocationChromeOsWifiDataProviderTest, NoAccessPoints) {
71 message_loop_.RunUntilIdle(); 71 message_loop_.RunUntilIdle();
72 // Initial call to GetAccessPointData requests data and will return false. 72 // Initial call to GetAccessPointData requests data and will return false.
73 EXPECT_FALSE(GetAccessPointData()); 73 EXPECT_FALSE(GetAccessPointData());
(...skipping 16 matching lines...) Expand all
90 TEST_F(GeolocationChromeOsWifiDataProviderTest, GetManyAccessPoints) { 90 TEST_F(GeolocationChromeOsWifiDataProviderTest, GetManyAccessPoints) {
91 message_loop_.RunUntilIdle(); 91 message_loop_.RunUntilIdle();
92 EXPECT_FALSE(GetAccessPointData()); 92 EXPECT_FALSE(GetAccessPointData());
93 93
94 AddAccessPoints(3, 4); 94 AddAccessPoints(3, 4);
95 EXPECT_TRUE(GetAccessPointData()); 95 EXPECT_TRUE(GetAccessPointData());
96 ASSERT_EQ(12u, ap_data_.size()); 96 ASSERT_EQ(12u, ap_data_.size());
97 } 97 }
98 98
99 } // namespace content 99 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698