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

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

Issue 91373004: Move DBusClient stub implementations into separate files. (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/modem_messaging_client.cc ('k') | chromeos/dbus/permission_broker_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 "chromeos/dbus/modem_messaging_client.h" 5 #include "chromeos/dbus/modem_messaging_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "dbus/message.h" 10 #include "dbus/message.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // Set an expectation so mock_bus's GetObjectProxy() for the given 78 // Set an expectation so mock_bus's GetObjectProxy() for the given
79 // service name and the object path will return mock_proxy_. 79 // service name and the object path will return mock_proxy_.
80 EXPECT_CALL(*mock_bus_.get(), 80 EXPECT_CALL(*mock_bus_.get(),
81 GetObjectProxy(kServiceName, dbus::ObjectPath(kObjectPath))) 81 GetObjectProxy(kServiceName, dbus::ObjectPath(kObjectPath)))
82 .WillOnce(Return(mock_proxy_.get())); 82 .WillOnce(Return(mock_proxy_.get()));
83 83
84 // ShutdownAndBlock() will be called in TearDown(). 84 // ShutdownAndBlock() will be called in TearDown().
85 EXPECT_CALL(*mock_bus_.get(), ShutdownAndBlock()).WillOnce(Return()); 85 EXPECT_CALL(*mock_bus_.get(), ShutdownAndBlock()).WillOnce(Return());
86 86
87 // Create a client with the mock bus. 87 // Create a client with the mock bus.
88 client_.reset( 88 client_.reset(ModemMessagingClient::Create());
89 ModemMessagingClient::Create(REAL_DBUS_CLIENT_IMPLEMENTATION));
90 client_->Init(mock_bus_.get()); 89 client_->Init(mock_bus_.get());
91 } 90 }
92 91
93 virtual void TearDown() OVERRIDE { 92 virtual void TearDown() OVERRIDE {
94 mock_bus_->ShutdownAndBlock(); 93 mock_bus_->ShutdownAndBlock();
95 } 94 }
96 95
97 // Handles Delete method call. 96 // Handles Delete method call.
98 void OnDelete(dbus::MethodCall* method_call, 97 void OnDelete(dbus::MethodCall* method_call,
99 int timeout_ms, 98 int timeout_ms,
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 // Call List. 233 // Call List.
235 client_->List(kServiceName, dbus::ObjectPath(kObjectPath), 234 client_->List(kServiceName, dbus::ObjectPath(kObjectPath),
236 base::Bind(&MockListCallback::Run, 235 base::Bind(&MockListCallback::Run,
237 base::Unretained(&callback))); 236 base::Unretained(&callback)));
238 237
239 // Run the message loop. 238 // Run the message loop.
240 message_loop_.RunUntilIdle(); 239 message_loop_.RunUntilIdle();
241 } 240 }
242 241
243 } // namespace chromeos 242 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/modem_messaging_client.cc ('k') | chromeos/dbus/permission_broker_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698