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

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

Issue 2392693002: Rewrite simple uses of base::ListValue::Append(base::Value*) on CrOS. (Closed)
Patch Set: MakeUnique Created 4 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) 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 TEST_F(ShillPropertyHandlerTest, ShillPropertyHandlerIPConfigPropertyChanged) { 420 TEST_F(ShillPropertyHandlerTest, ShillPropertyHandlerIPConfigPropertyChanged) {
421 // Set the properties for an IP Config object. 421 // Set the properties for an IP Config object.
422 const std::string kTestIPConfigPath("test_ip_config_path"); 422 const std::string kTestIPConfigPath("test_ip_config_path");
423 423
424 base::StringValue ip_address("192.168.1.1"); 424 base::StringValue ip_address("192.168.1.1");
425 DBusThreadManager::Get()->GetShillIPConfigClient()->SetProperty( 425 DBusThreadManager::Get()->GetShillIPConfigClient()->SetProperty(
426 dbus::ObjectPath(kTestIPConfigPath), 426 dbus::ObjectPath(kTestIPConfigPath),
427 shill::kAddressProperty, ip_address, 427 shill::kAddressProperty, ip_address,
428 base::Bind(&DoNothingWithCallStatus)); 428 base::Bind(&DoNothingWithCallStatus));
429 base::ListValue dns_servers; 429 base::ListValue dns_servers;
430 dns_servers.Append(new base::StringValue("192.168.1.100")); 430 dns_servers.AppendString("192.168.1.100");
431 dns_servers.Append(new base::StringValue("192.168.1.101")); 431 dns_servers.AppendString("192.168.1.101");
432 DBusThreadManager::Get()->GetShillIPConfigClient()->SetProperty( 432 DBusThreadManager::Get()->GetShillIPConfigClient()->SetProperty(
433 dbus::ObjectPath(kTestIPConfigPath), 433 dbus::ObjectPath(kTestIPConfigPath),
434 shill::kNameServersProperty, dns_servers, 434 shill::kNameServersProperty, dns_servers,
435 base::Bind(&DoNothingWithCallStatus)); 435 base::Bind(&DoNothingWithCallStatus));
436 base::FundamentalValue prefixlen(8); 436 base::FundamentalValue prefixlen(8);
437 DBusThreadManager::Get()->GetShillIPConfigClient()->SetProperty( 437 DBusThreadManager::Get()->GetShillIPConfigClient()->SetProperty(
438 dbus::ObjectPath(kTestIPConfigPath), 438 dbus::ObjectPath(kTestIPConfigPath),
439 shill::kPrefixlenProperty, prefixlen, 439 shill::kPrefixlenProperty, prefixlen,
440 base::Bind(&DoNothingWithCallStatus)); 440 base::Bind(&DoNothingWithCallStatus));
441 base::StringValue gateway("192.0.0.1"); 441 base::StringValue gateway("192.0.0.1");
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 shill_property_handler_->SetProhibitedTechnologies( 529 shill_property_handler_->SetProhibitedTechnologies(
530 prohibited_technologies, network_handler::ErrorCallback()); 530 prohibited_technologies, network_handler::ErrorCallback());
531 shill_property_handler_->SetTechnologyEnabled( 531 shill_property_handler_->SetTechnologyEnabled(
532 shill::kTypeEthernet, true, network_handler::ErrorCallback()); 532 shill::kTypeEthernet, true, network_handler::ErrorCallback());
533 base::RunLoop().RunUntilIdle(); 533 base::RunLoop().RunUntilIdle();
534 EXPECT_TRUE( 534 EXPECT_TRUE(
535 shill_property_handler_->IsTechnologyEnabled(shill::kTypeEthernet)); 535 shill_property_handler_->IsTechnologyEnabled(shill::kTypeEthernet));
536 } 536 }
537 537
538 } // namespace chromeos 538 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/onc/onc_translator_shill_to_onc.cc ('k') | components/user_manager/known_user.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698