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 "chromeos/network/shill_property_handler.h" | 5 #include "chromeos/network/shill_property_handler.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 void SetupShillPropertyHandler() { | 241 void SetupShillPropertyHandler() { |
242 SetupDefaultShillState(); | 242 SetupDefaultShillState(); |
243 listener_.reset(new TestListener); | 243 listener_.reset(new TestListener); |
244 shill_property_handler_.reset( | 244 shill_property_handler_.reset( |
245 new internal::ShillPropertyHandler(listener_.get())); | 245 new internal::ShillPropertyHandler(listener_.get())); |
246 shill_property_handler_->Init(); | 246 shill_property_handler_->Init(); |
247 } | 247 } |
248 | 248 |
249 bool IsValidType(const std::string& type) { | 249 bool IsValidType(const std::string& type) { |
250 return (type == flimflam::kTypeEthernet || | 250 return (type == flimflam::kTypeEthernet || |
| 251 type == shill::kTypeEthernetEap || |
251 type == flimflam::kTypeWifi || | 252 type == flimflam::kTypeWifi || |
252 type == flimflam::kTypeWimax || | 253 type == flimflam::kTypeWimax || |
253 type == flimflam::kTypeBluetooth || | 254 type == flimflam::kTypeBluetooth || |
254 type == flimflam::kTypeCellular || | 255 type == flimflam::kTypeCellular || |
255 type == flimflam::kTypeVPN); | 256 type == flimflam::kTypeVPN); |
256 } | 257 } |
257 | 258 |
258 protected: | 259 protected: |
259 void SetupDefaultShillState() { | 260 void SetupDefaultShillState() { |
260 message_loop_.RunUntilIdle(); // Process any pending updates | 261 message_loop_.RunUntilIdle(); // Process any pending updates |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 message_loop_.RunUntilIdle(); | 532 message_loop_.RunUntilIdle(); |
532 // Property change should trigger an update for the Network only; no | 533 // Property change should trigger an update for the Network only; no |
533 // property updates pushed by Shill affect Favorites. | 534 // property updates pushed by Shill affect Favorites. |
534 EXPECT_EQ(2, listener_->property_updates( | 535 EXPECT_EQ(2, listener_->property_updates( |
535 flimflam::kServicesProperty)[kTestServicePath2]); | 536 flimflam::kServicesProperty)[kTestServicePath2]); |
536 EXPECT_EQ(0, listener_->property_updates( | 537 EXPECT_EQ(0, listener_->property_updates( |
537 shill::kServiceCompleteListProperty)[kTestServicePath2]); | 538 shill::kServiceCompleteListProperty)[kTestServicePath2]); |
538 } | 539 } |
539 | 540 |
540 } // namespace chromeos | 541 } // namespace chromeos |
OLD | NEW |