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

Side by Side Diff: chromeos/dbus/shill_device_client_unittest.cc

Issue 91413002: Remove fake client creation from DBusClients' Create() functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chromeos/dbus/shill_device_client.cc ('k') | chromeos/dbus/shill_ipconfig_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_device_client.h" 8 #include "chromeos/dbus/shill_device_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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 class ShillDeviceClientTest : public ShillClientUnittestBase { 52 class ShillDeviceClientTest : public ShillClientUnittestBase {
53 public: 53 public:
54 ShillDeviceClientTest() 54 ShillDeviceClientTest()
55 : ShillClientUnittestBase(shill::kFlimflamDeviceInterface, 55 : ShillClientUnittestBase(shill::kFlimflamDeviceInterface,
56 dbus::ObjectPath(kExampleDevicePath)) { 56 dbus::ObjectPath(kExampleDevicePath)) {
57 } 57 }
58 58
59 virtual void SetUp() { 59 virtual void SetUp() {
60 ShillClientUnittestBase::SetUp(); 60 ShillClientUnittestBase::SetUp();
61 // Create a client with the mock bus. 61 // Create a client with the mock bus.
62 client_.reset(ShillDeviceClient::Create(REAL_DBUS_CLIENT_IMPLEMENTATION)); 62 client_.reset(ShillDeviceClient::Create());
63 client_->Init(mock_bus_.get()); 63 client_->Init(mock_bus_.get());
64 // Run the message loop to run the signal connection result callback. 64 // Run the message loop to run the signal connection result callback.
65 message_loop_.RunUntilIdle(); 65 message_loop_.RunUntilIdle();
66 } 66 }
67 67
68 virtual void TearDown() { 68 virtual void TearDown() {
69 ShillClientUnittestBase::TearDown(); 69 ShillClientUnittestBase::TearDown();
70 } 70 }
71 71
72 protected: 72 protected:
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 EXPECT_CALL(mock_closure, Run()).Times(1); 375 EXPECT_CALL(mock_closure, Run()).Times(1);
376 // Call method. 376 // Call method.
377 client_->Reset(dbus::ObjectPath(kExampleDevicePath), 377 client_->Reset(dbus::ObjectPath(kExampleDevicePath),
378 mock_closure.GetCallback(), 378 mock_closure.GetCallback(),
379 mock_error_callback.GetCallback()); 379 mock_error_callback.GetCallback());
380 // Run the message loop. 380 // Run the message loop.
381 message_loop_.RunUntilIdle(); 381 message_loop_.RunUntilIdle();
382 } 382 }
383 383
384 } // namespace chromeos 384 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/shill_device_client.cc ('k') | chromeos/dbus/shill_ipconfig_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698