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

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

Issue 14876021: Re-factor network_event_log (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address final nits Created 7 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 unified diff | Download patch | Annotate | Revision Log
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/network_state_handler.h" 5 #include "chromeos/network/network_state_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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 base::StringValue security_value("TestSecurity"); 268 base::StringValue security_value("TestSecurity");
269 DBusThreadManager::Get()->GetShillServiceClient()->SetProperty( 269 DBusThreadManager::Get()->GetShillServiceClient()->SetProperty(
270 dbus::ObjectPath(eth0), 270 dbus::ObjectPath(eth0),
271 flimflam::kSecurityProperty, security_value, 271 flimflam::kSecurityProperty, security_value,
272 base::Bind(&base::DoNothing), base::Bind(&ErrorCallbackFunction)); 272 base::Bind(&base::DoNothing), base::Bind(&ErrorCallbackFunction));
273 message_loop_.RunUntilIdle(); 273 message_loop_.RunUntilIdle();
274 EXPECT_EQ("TestSecurity", 274 EXPECT_EQ("TestSecurity",
275 network_state_handler_->GetNetworkState(eth0)->security()); 275 network_state_handler_->GetNetworkState(eth0)->security());
276 EXPECT_EQ(2, test_observer_->PropertyUpdatesForService(eth0)); 276 EXPECT_EQ(2, test_observer_->PropertyUpdatesForService(eth0));
277 277
278 // Changing a service to the exsiting value should not trigger an update. 278 // Changing a service to the existing value should not trigger an update.
279 DBusThreadManager::Get()->GetShillServiceClient()->SetProperty( 279 DBusThreadManager::Get()->GetShillServiceClient()->SetProperty(
280 dbus::ObjectPath(eth0), 280 dbus::ObjectPath(eth0),
281 flimflam::kSecurityProperty, security_value, 281 flimflam::kSecurityProperty, security_value,
282 base::Bind(&base::DoNothing), base::Bind(&ErrorCallbackFunction)); 282 base::Bind(&base::DoNothing), base::Bind(&ErrorCallbackFunction));
283 message_loop_.RunUntilIdle(); 283 message_loop_.RunUntilIdle();
284 EXPECT_EQ(2, test_observer_->PropertyUpdatesForService(eth0)); 284 EXPECT_EQ(2, test_observer_->PropertyUpdatesForService(eth0));
285 } 285 }
286 286
287 TEST_F(NetworkStateHandlerTest, NetworkConnectionStateChanged) { 287 TEST_F(NetworkStateHandlerTest, NetworkConnectionStateChanged) {
288 // Change a network state. 288 // Change a network state.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 // No default network updates for signal strength changes. 340 // No default network updates for signal strength changes.
341 DBusThreadManager::Get()->GetShillServiceClient()->SetProperty( 341 DBusThreadManager::Get()->GetShillServiceClient()->SetProperty(
342 dbus::ObjectPath(wifi1), 342 dbus::ObjectPath(wifi1),
343 flimflam::kSignalStrengthProperty, base::FundamentalValue(32), 343 flimflam::kSignalStrengthProperty, base::FundamentalValue(32),
344 base::Bind(&base::DoNothing), base::Bind(&ErrorCallbackFunction)); 344 base::Bind(&base::DoNothing), base::Bind(&ErrorCallbackFunction));
345 message_loop_.RunUntilIdle(); 345 message_loop_.RunUntilIdle();
346 EXPECT_EQ(3u, test_observer_->default_network_change_count()); 346 EXPECT_EQ(3u, test_observer_->default_network_change_count());
347 } 347 }
348 348
349 } // namespace chromeos 349 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/network_state_handler.cc ('k') | chromeos/network/onc/onc_certificate_importer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698