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/shill_client_unittest_base.h" | 7 #include "chromeos/dbus/shill_client_unittest_base.h" |
8 #include "chromeos/dbus/shill_profile_client.h" | 8 #include "chromeos/dbus/shill_profile_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 24 matching lines...) Expand all Loading... |
35 public: | 35 public: |
36 ShillProfileClientTest() | 36 ShillProfileClientTest() |
37 : ShillClientUnittestBase(flimflam::kFlimflamProfileInterface, | 37 : ShillClientUnittestBase(flimflam::kFlimflamProfileInterface, |
38 dbus::ObjectPath(kDefaultProfilePath)) { | 38 dbus::ObjectPath(kDefaultProfilePath)) { |
39 } | 39 } |
40 | 40 |
41 virtual void SetUp() { | 41 virtual void SetUp() { |
42 ShillClientUnittestBase::SetUp(); | 42 ShillClientUnittestBase::SetUp(); |
43 // Create a client with the mock bus. | 43 // Create a client with the mock bus. |
44 client_.reset(ShillProfileClient::Create(REAL_DBUS_CLIENT_IMPLEMENTATION, | 44 client_.reset(ShillProfileClient::Create(REAL_DBUS_CLIENT_IMPLEMENTATION, |
45 mock_bus_)); | 45 mock_bus_.get())); |
46 // Run the message loop to run the signal connection result callback. | 46 // Run the message loop to run the signal connection result callback. |
47 message_loop_.RunUntilIdle(); | 47 message_loop_.RunUntilIdle(); |
48 } | 48 } |
49 | 49 |
50 virtual void TearDown() { | 50 virtual void TearDown() { |
51 ShillClientUnittestBase::TearDown(); | 51 ShillClientUnittestBase::TearDown(); |
52 } | 52 } |
53 | 53 |
54 protected: | 54 protected: |
55 scoped_ptr<ShillProfileClient> client_; | 55 scoped_ptr<ShillProfileClient> client_; |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 mock_closure.GetCallback(), | 181 mock_closure.GetCallback(), |
182 mock_error_callback.GetCallback()); | 182 mock_error_callback.GetCallback()); |
183 EXPECT_CALL(mock_closure, Run()).Times(1); | 183 EXPECT_CALL(mock_closure, Run()).Times(1); |
184 EXPECT_CALL(mock_error_callback, Run(_, _)).Times(0); | 184 EXPECT_CALL(mock_error_callback, Run(_, _)).Times(0); |
185 | 185 |
186 // Run the message loop. | 186 // Run the message loop. |
187 message_loop_.RunUntilIdle(); | 187 message_loop_.RunUntilIdle(); |
188 } | 188 } |
189 | 189 |
190 } // namespace chromeos | 190 } // namespace chromeos |
OLD | NEW |