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

Side by Side Diff: chromeos/network/geolocation_handler_unittest.cc

Issue 24348002: Migrate DBus service constants from flimflam namespace to shill namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased to ToT Created 7 years, 2 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chromeos/dbus/dbus_thread_manager.h" 9 #include "chromeos/dbus/dbus_thread_manager.h"
10 #include "chromeos/dbus/shill_manager_client.h" 10 #include "chromeos/dbus/shill_manager_client.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 base::StringPrintf("%02X:%02X:%02X:%02X:%02X:%02X", 50 base::StringPrintf("%02X:%02X:%02X:%02X:%02X:%02X",
51 idx, 0, 0, 0, 0, 0); 51 idx, 0, 0, 0, 0, 0);
52 std::string channel = base::StringPrintf("%d", idx); 52 std::string channel = base::StringPrintf("%d", idx);
53 std::string strength = base::StringPrintf("%d", idx * 10); 53 std::string strength = base::StringPrintf("%d", idx * 10);
54 properties.SetStringWithoutPathExpansion( 54 properties.SetStringWithoutPathExpansion(
55 shill::kGeoMacAddressProperty, mac_address); 55 shill::kGeoMacAddressProperty, mac_address);
56 properties.SetStringWithoutPathExpansion( 56 properties.SetStringWithoutPathExpansion(
57 shill::kGeoChannelProperty, channel); 57 shill::kGeoChannelProperty, channel);
58 properties.SetStringWithoutPathExpansion( 58 properties.SetStringWithoutPathExpansion(
59 shill::kGeoSignalStrengthProperty, strength); 59 shill::kGeoSignalStrengthProperty, strength);
60 manager_test_->AddGeoNetwork(flimflam::kTypeWifi, properties); 60 manager_test_->AddGeoNetwork(shill::kTypeWifi, properties);
61 message_loop_.RunUntilIdle(); 61 message_loop_.RunUntilIdle();
62 } 62 }
63 63
64 protected: 64 protected:
65 base::MessageLoopForUI message_loop_; 65 base::MessageLoopForUI message_loop_;
66 scoped_ptr<GeolocationHandler> geolocation_handler_; 66 scoped_ptr<GeolocationHandler> geolocation_handler_;
67 ShillManagerClient::TestInterface* manager_test_; 67 ShillManagerClient::TestInterface* manager_test_;
68 WifiAccessPointVector wifi_access_points_; 68 WifiAccessPointVector wifi_access_points_;
69 69
70 private: 70 private:
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 EXPECT_FALSE(GetWifiAccessPoints()); 103 EXPECT_FALSE(GetWifiAccessPoints());
104 message_loop_.RunUntilIdle(); 104 message_loop_.RunUntilIdle();
105 // Second call should return true since we have an access point. 105 // Second call should return true since we have an access point.
106 EXPECT_TRUE(GetWifiAccessPoints()); 106 EXPECT_TRUE(GetWifiAccessPoints());
107 ASSERT_EQ(3u, wifi_access_points_.size()); 107 ASSERT_EQ(3u, wifi_access_points_.size());
108 EXPECT_EQ("02:00:00:00:00:00", wifi_access_points_[1].mac_address); 108 EXPECT_EQ("02:00:00:00:00:00", wifi_access_points_[1].mac_address);
109 EXPECT_EQ(3, wifi_access_points_[2].channel); 109 EXPECT_EQ(3, wifi_access_points_[2].channel);
110 } 110 }
111 111
112 } // namespace chromeos 112 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/geolocation_handler.cc ('k') | chromeos/network/managed_network_configuration_handler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698