| 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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 TEST_F(ShillPropertyHandlerTest, ShillPropertyHandlerIPConfigPropertyChanged) { | 415 TEST_F(ShillPropertyHandlerTest, ShillPropertyHandlerIPConfigPropertyChanged) { |
| 416 // Set the properties for an IP Config object. | 416 // Set the properties for an IP Config object. |
| 417 const std::string kTestIPConfigPath("test_ip_config_path"); | 417 const std::string kTestIPConfigPath("test_ip_config_path"); |
| 418 | 418 |
| 419 base::StringValue ip_address("192.168.1.1"); | 419 base::StringValue ip_address("192.168.1.1"); |
| 420 DBusThreadManager::Get()->GetShillIPConfigClient()->SetProperty( | 420 DBusThreadManager::Get()->GetShillIPConfigClient()->SetProperty( |
| 421 dbus::ObjectPath(kTestIPConfigPath), | 421 dbus::ObjectPath(kTestIPConfigPath), |
| 422 shill::kAddressProperty, ip_address, | 422 shill::kAddressProperty, ip_address, |
| 423 base::Bind(&DoNothingWithCallStatus)); | 423 base::Bind(&DoNothingWithCallStatus)); |
| 424 base::ListValue dns_servers; | 424 base::ListValue dns_servers; |
| 425 dns_servers.Append(base::Value::CreateStringValue("192.168.1.100")); | 425 dns_servers.Append(new base::StringValue("192.168.1.100")); |
| 426 dns_servers.Append(base::Value::CreateStringValue("192.168.1.101")); | 426 dns_servers.Append(new base::StringValue("192.168.1.101")); |
| 427 DBusThreadManager::Get()->GetShillIPConfigClient()->SetProperty( | 427 DBusThreadManager::Get()->GetShillIPConfigClient()->SetProperty( |
| 428 dbus::ObjectPath(kTestIPConfigPath), | 428 dbus::ObjectPath(kTestIPConfigPath), |
| 429 shill::kNameServersProperty, dns_servers, | 429 shill::kNameServersProperty, dns_servers, |
| 430 base::Bind(&DoNothingWithCallStatus)); | 430 base::Bind(&DoNothingWithCallStatus)); |
| 431 base::FundamentalValue prefixlen(8); | 431 base::FundamentalValue prefixlen(8); |
| 432 DBusThreadManager::Get()->GetShillIPConfigClient()->SetProperty( | 432 DBusThreadManager::Get()->GetShillIPConfigClient()->SetProperty( |
| 433 dbus::ObjectPath(kTestIPConfigPath), | 433 dbus::ObjectPath(kTestIPConfigPath), |
| 434 shill::kPrefixlenProperty, prefixlen, | 434 shill::kPrefixlenProperty, prefixlen, |
| 435 base::Bind(&DoNothingWithCallStatus)); | 435 base::Bind(&DoNothingWithCallStatus)); |
| 436 base::StringValue gateway("192.0.0.1"); | 436 base::StringValue gateway("192.0.0.1"); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 shill_property_handler_->UpdateManagerProperties(); | 494 shill_property_handler_->UpdateManagerProperties(); |
| 495 message_loop_.RunUntilIdle(); | 495 message_loop_.RunUntilIdle(); |
| 496 EXPECT_EQ(1, listener_->list_updates(shill::kServiceCompleteListProperty)); | 496 EXPECT_EQ(1, listener_->list_updates(shill::kServiceCompleteListProperty)); |
| 497 EXPECT_EQ(1, listener_->initial_property_updates( | 497 EXPECT_EQ(1, listener_->initial_property_updates( |
| 498 shill::kServiceCompleteListProperty)[kTestServicePath2]); | 498 shill::kServiceCompleteListProperty)[kTestServicePath2]); |
| 499 EXPECT_EQ(1, listener_->property_updates( | 499 EXPECT_EQ(1, listener_->property_updates( |
| 500 shill::kServiceCompleteListProperty)[kTestServicePath2]); | 500 shill::kServiceCompleteListProperty)[kTestServicePath2]); |
| 501 } | 501 } |
| 502 | 502 |
| 503 } // namespace chromeos | 503 } // namespace chromeos |
| OLD | NEW |