summaryrefslogtreecommitdiffstats
path: root/chromeos/dbus/shill_service_client_unittest.cc
diff options
context:
space:
mode:
authorstevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-10 18:51:24 +0000
committerstevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-10 18:51:24 +0000
commite499e674b043597f1f05ce1bd070241014a884a3 (patch)
tree041145537edafb540e79893654d7906f7fca6465 /chromeos/dbus/shill_service_client_unittest.cc
parentb2ae272934e53cea31c6d279928c118b7cb1ebd3 (diff)
downloadchromium_src-e499e674b043597f1f05ce1bd070241014a884a3.zip
chromium_src-e499e674b043597f1f05ce1bd070241014a884a3.tar.gz
chromium_src-e499e674b043597f1f05ce1bd070241014a884a3.tar.bz2
Add support for Service.SetProperties
BUG=258633 R=satorux@chromium.org Review URL: https://codereview.chromium.org/18619006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210899 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/dbus/shill_service_client_unittest.cc')
-rw-r--r--chromeos/dbus/shill_service_client_unittest.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/chromeos/dbus/shill_service_client_unittest.cc b/chromeos/dbus/shill_service_client_unittest.cc
index d4d3bd7..3d5649f 100644
--- a/chromeos/dbus/shill_service_client_unittest.cc
+++ b/chromeos/dbus/shill_service_client_unittest.cc
@@ -138,6 +138,30 @@ TEST_F(ShillServiceClientTest, SetProperty) {
message_loop_.RunUntilIdle();
}
+TEST_F(ShillServiceClientTest, SetProperties) {
+ // Create response.
+ scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+
+ // Set expectations.
+ scoped_ptr<base::DictionaryValue> arg(CreateExampleServiceProperties());
+ PrepareForMethodCall(shill::kSetPropertiesFunction,
+ base::Bind(&ExpectDictionaryValueArgument, arg.get()),
+ response.get());
+
+ // Call method.
+ MockClosure mock_closure;
+ MockErrorCallback mock_error_callback;
+ client_->SetProperties(dbus::ObjectPath(kExampleServicePath),
+ *arg,
+ mock_closure.GetCallback(),
+ mock_error_callback.GetCallback());
+ EXPECT_CALL(mock_closure, Run()).Times(1);
+ EXPECT_CALL(mock_error_callback, Run(_, _)).Times(0);
+
+ // Run the message loop.
+ message_loop_.RunUntilIdle();
+}
+
TEST_F(ShillServiceClientTest, ClearProperty) {
// Create response.
scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());