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

Unified Diff: chromeos/network/shill_property_handler_unittest.cc

Issue 267433005: Provide IPConfigs in networkingPrivate.GetProperties (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/network/shill_property_handler.cc ('k') | components/onc/onc_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/shill_property_handler_unittest.cc
diff --git a/chromeos/network/shill_property_handler_unittest.cc b/chromeos/network/shill_property_handler_unittest.cc
index a6b7b8e1e46cd25fddd10d0ded8c2b94aad8c58e..7655d84e0377371f1aca7a8478566e13ac0f09ba 100644
--- a/chromeos/network/shill_property_handler_unittest.cc
+++ b/chromeos/network/shill_property_handler_unittest.cc
@@ -69,6 +69,14 @@ class TestListener : public internal::ShillPropertyHandler::Listener {
AddPropertyUpdate(shill::kDevicesProperty, device_path);
}
+ virtual void UpdateIPConfigProperties(
+ ManagedState::ManagedType type,
+ const std::string& path,
+ const std::string& ip_config_path,
+ const base::DictionaryValue& properties) OVERRIDE {
+ AddPropertyUpdate(shill::kIPConfigsProperty, ip_config_path);
+ }
+
virtual void TechnologyListChanged() OVERRIDE {
++technology_list_updates_;
}
@@ -463,20 +471,19 @@ TEST_F(ShillPropertyHandlerTest, ShillPropertyHandlerIPConfigPropertyChanged) {
base::StringValue(kTestIPConfigPath),
base::Bind(&base::DoNothing), base::Bind(&ErrorCallbackFunction));
message_loop_.RunUntilIdle();
- // IPConfig property change on the service should trigger property updates for
- // IP Address, DNS, prefixlen, and gateway.
- EXPECT_EQ(4, listener_->property_updates(
- shill::kServicesProperty)[kTestServicePath1]);
+ // IPConfig property change on the service should trigger an IPConfigs update.
+ EXPECT_EQ(1, listener_->property_updates(
+ shill::kIPConfigsProperty)[kTestIPConfigPath]);
// Now, Add a new watched service with the IPConfig already set.
const std::string kTestServicePath2("test_wifi_service2");
AddServiceWithIPConfig(shill::kTypeWifi, kTestServicePath2,
shill::kStateIdle, kTestIPConfigPath, true);
message_loop_.RunUntilIdle();
- // A watched service with the IPConfig property already set must trigger
- // property updates for IP Address, DNS, prefixlen, and gateway when added.
- EXPECT_EQ(4, listener_->property_updates(
- shill::kServicesProperty)[kTestServicePath2]);
+ // A watched service with the IPConfig property already set should trigger an
+ // additional IPConfigs update.
+ EXPECT_EQ(2, listener_->property_updates(
+ shill::kIPConfigsProperty)[kTestIPConfigPath]);
}
TEST_F(ShillPropertyHandlerTest, ShillPropertyHandlerServiceCompleteList) {
« no previous file with comments | « chromeos/network/shill_property_handler.cc ('k') | components/onc/onc_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698