OLD | NEW |
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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/values.h" | 6 #include "base/values.h" |
7 #include "chromeos/dbus/flimflam_client_unittest_base.h" | 7 #include "chromeos/dbus/flimflam_client_unittest_base.h" |
8 #include "chromeos/dbus/flimflam_manager_client.h" | 8 #include "chromeos/dbus/flimflam_manager_client.h" |
9 #include "dbus/message.h" | 9 #include "dbus/message.h" |
10 #include "dbus/object_path.h" | 10 #include "dbus/object_path.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 break; | 59 break; |
60 case dbus::Message::BOOL: | 60 case dbus::Message::BOOL: |
61 case dbus::Message::INT32: | 61 case dbus::Message::INT32: |
62 case dbus::Message::STRING: | 62 case dbus::Message::STRING: |
63 value.reset(dbus::PopDataAsValue(&variant_reader)); | 63 value.reset(dbus::PopDataAsValue(&variant_reader)); |
64 break; | 64 break; |
65 default: | 65 default: |
66 NOTREACHED(); | 66 NOTREACHED(); |
67 } | 67 } |
68 ASSERT_TRUE(value.get()); | 68 ASSERT_TRUE(value.get()); |
69 base::Value* expected_value = NULL; | 69 const base::Value* expected_value = NULL; |
70 EXPECT_TRUE(expected_dictionary->GetWithoutPathExpansion(key, | 70 EXPECT_TRUE(expected_dictionary->GetWithoutPathExpansion(key, |
71 &expected_value)); | 71 &expected_value)); |
72 EXPECT_TRUE(value->Equals(expected_value)); | 72 EXPECT_TRUE(value->Equals(expected_value)); |
73 } | 73 } |
74 } | 74 } |
75 | 75 |
76 // Creates a DictionaryValue with example properties. | 76 // Creates a DictionaryValue with example properties. |
77 base::DictionaryValue* CreateExampleProperties() { | 77 base::DictionaryValue* CreateExampleProperties() { |
78 base::DictionaryValue* properties = new base::DictionaryValue; | 78 base::DictionaryValue* properties = new base::DictionaryValue; |
79 properties->SetWithoutPathExpansion( | 79 properties->SetWithoutPathExpansion( |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 PrepareForMethodCall(flimflam::kGetServiceFunction, | 282 PrepareForMethodCall(flimflam::kGetServiceFunction, |
283 base::Bind(&ExpectDictionaryValueArgument, arg.get()), | 283 base::Bind(&ExpectDictionaryValueArgument, arg.get()), |
284 response.get()); | 284 response.get()); |
285 // Call method. | 285 // Call method. |
286 client_->GetService(*arg, base::Bind(&ExpectObjectPathResult, object_path)); | 286 client_->GetService(*arg, base::Bind(&ExpectObjectPathResult, object_path)); |
287 // Run the message loop. | 287 // Run the message loop. |
288 message_loop_.RunAllPending(); | 288 message_loop_.RunAllPending(); |
289 } | 289 } |
290 | 290 |
291 } // namespace chromeos | 291 } // namespace chromeos |
OLD | NEW |