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

Unified Diff: chromeos/dbus/shill_service_client_unittest.cc

Issue 12220025: Shill: ShillServiceClient destroys ShillClientHelpers when they are not need. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Delay in the ConnectToSignal call introduced. Created 7 years, 10 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/dbus/shill_service_client.cc ('k') | dbus/mock_bus.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/shill_service_client_unittest.cc
diff --git a/chromeos/dbus/shill_service_client_unittest.cc b/chromeos/dbus/shill_service_client_unittest.cc
index 736c215a96c1f61f2cb24ac7e8eaa23613f39f81..8ff33902595888da9e0162175f4bdd8b9b1fed49 100644
--- a/chromeos/dbus/shill_service_client_unittest.cc
+++ b/chromeos/dbus/shill_service_client_unittest.cc
@@ -64,6 +64,10 @@ TEST_F(ShillServiceClientTest, PropertyChanged) {
flimflam::kSignalStrengthProperty,
ValueEq(ByRef(value)))).Times(1);
+ // The ShillClientHelper should be created here because of this call.
+ EXPECT_CALL(*mock_bus_, RemoveObjectProxy(_,
+ dbus::ObjectPath(kExampleServicePath), _)).Times(0);
+
// Add the observer
client_->AddPropertyChangedObserver(
dbus::ObjectPath(kExampleServicePath),
@@ -72,6 +76,9 @@ TEST_F(ShillServiceClientTest, PropertyChanged) {
// Run the signal callback.
SendPropertyChangedSignal(&signal);
+ EXPECT_CALL(*mock_bus_, RemoveObjectProxy(_,
+ dbus::ObjectPath(kExampleServicePath), _)).Times(1);
+
// Remove the observer.
client_->RemovePropertyChangedObserver(
dbus::ObjectPath(kExampleServicePath),
« no previous file with comments | « chromeos/dbus/shill_service_client.cc ('k') | dbus/mock_bus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698