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

Unified Diff: chromeos/dbus/flimflam_manager_client_unittest.cc

Issue 10202009: Reimplement CrosGetWifiAccessPoints without Libcros (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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/flimflam_manager_client.cc ('k') | chromeos/dbus/mock_flimflam_manager_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/flimflam_manager_client_unittest.cc
diff --git a/chromeos/dbus/flimflam_manager_client_unittest.cc b/chromeos/dbus/flimflam_manager_client_unittest.cc
index 6dcc0df2fd3ac6c78ded8a50b858acc91d1812e1..502f67f51398fa7e38bd0a7c64ea67877687abe7 100644
--- a/chromeos/dbus/flimflam_manager_client_unittest.cc
+++ b/chromeos/dbus/flimflam_manager_client_unittest.cc
@@ -169,6 +169,33 @@ TEST_F(FlimflamManagerClientTest, GetProperties) {
message_loop_.RunAllPending();
}
+TEST_F(FlimflamManagerClientTest, CallGetPropertiesAndBlock) {
+ // Create response.
+ scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
+ dbus::MessageWriter writer(response.get());
+ dbus::MessageWriter array_writer(NULL);
+ writer.OpenArray("{sv}", &array_writer);
+ dbus::MessageWriter entry_writer(NULL);
+ array_writer.OpenDictEntry(&entry_writer);
+ entry_writer.AppendString(flimflam::kOfflineModeProperty);
+ entry_writer.AppendVariantOfBool(true);
+ array_writer.CloseContainer(&entry_writer);
+ writer.CloseContainer(&array_writer);
+
+ // Create the expected value.
+ base::DictionaryValue value;
+ value.SetWithoutPathExpansion(flimflam::kOfflineModeProperty,
+ base::Value::CreateBooleanValue(true));
+ // Set expectations.
+ PrepareForMethodCall(flimflam::kGetPropertiesFunction,
+ base::Bind(&ExpectNoArgument),
+ response.get());
+ // Call method.
+ scoped_ptr<base::DictionaryValue> result(
+ client_->CallGetPropertiesAndBlock());
+ EXPECT_TRUE(value.Equals(result.get()));
+}
+
TEST_F(FlimflamManagerClientTest, SetProperty) {
// Create response.
scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
« no previous file with comments | « chromeos/dbus/flimflam_manager_client.cc ('k') | chromeos/dbus/mock_flimflam_manager_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698