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

Side by Side Diff: net/base/network_change_notifier_linux_unittest.cc

Issue 11275088: Remove implicit scoped_refptr operator T* Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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
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 "net/base/network_change_notifier_linux.h" 5 #include "net/base/network_change_notifier_linux.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop_proxy.h" 8 #include "base/message_loop_proxy.h"
9 #include "base/synchronization/waitable_event.h" 9 #include "base/synchronization/waitable_event.h"
10 #include "dbus/mock_bus.h" 10 #include "dbus/mock_bus.h"
(...skipping 28 matching lines...) Expand all
39 39
40 virtual void SetUp() { 40 virtual void SetUp() {
41 dbus::Bus::Options options; 41 dbus::Bus::Options options;
42 options.bus_type = dbus::Bus::SYSTEM; 42 options.bus_type = dbus::Bus::SYSTEM;
43 mock_bus_ = new dbus::MockBus(options); 43 mock_bus_ = new dbus::MockBus(options);
44 44
45 mock_object_proxy_ = new dbus::MockObjectProxy( 45 mock_object_proxy_ = new dbus::MockObjectProxy(
46 mock_bus_.get(), 46 mock_bus_.get(),
47 "service_name", 47 "service_name",
48 dbus::ObjectPath("service_path")); 48 dbus::ObjectPath("service_path"));
49 EXPECT_CALL(*mock_bus_, GetObjectProxyWithOptions(_, _, _)) 49 EXPECT_CALL(*mock_bus_.get(), GetObjectProxyWithOptions(_, _, _))
50 .WillOnce(Return(mock_object_proxy_.get())); 50 .WillOnce(Return(mock_object_proxy_.get()));
51 51
52 EXPECT_CALL(*mock_object_proxy_, CallMethod(_, _, _)) 52 EXPECT_CALL(*mock_object_proxy_.get(), CallMethod(_, _, _))
53 .WillOnce(SaveArg<2>(&response_callback_)); 53 .WillOnce(SaveArg<2>(&response_callback_));
54 EXPECT_CALL(*mock_object_proxy_, ConnectToSignal(_, _, _, _)) 54 EXPECT_CALL(*mock_object_proxy_.get(), ConnectToSignal(_, _, _, _))
55 .WillOnce( 55 .WillOnce(
56 DoAll( 56 DoAll(
57 SaveArg<2>(&signal_callback_), 57 SaveArg<2>(&signal_callback_),
58 InvokeWithoutArgs( 58 InvokeWithoutArgs(
59 this, 59 this,
60 &NetworkChangeNotifierLinuxTest::Initialize))); 60 &NetworkChangeNotifierLinuxTest::Initialize)));
61 61
62 notifier_.reset(NetworkChangeNotifierLinux::CreateForTest(mock_bus_.get())); 62 notifier_.reset(NetworkChangeNotifierLinux::CreateForTest(mock_bus_.get()));
63 63
64 initialized_.Wait(); 64 initialized_.Wait();
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty()); 234 scoped_ptr<dbus::Response> response(dbus::Response::CreateEmpty());
235 dbus::MessageWriter writer(response.get()); 235 dbus::MessageWriter writer(response.get());
236 writer.AppendUint16(20); // Uint16 instead of the expected Uint32 236 writer.AppendUint16(20); // Uint16 instead of the expected Uint32
237 RunOnNotifierThread(base::Bind(response_callback_, response.get())); 237 RunOnNotifierThread(base::Bind(response_callback_, response.get()));
238 EXPECT_NE(NetworkChangeNotifier::CONNECTION_NONE, 238 EXPECT_NE(NetworkChangeNotifier::CONNECTION_NONE,
239 NetworkChangeNotifier::GetConnectionType()); 239 NetworkChangeNotifier::GetConnectionType());
240 } 240 }
241 241
242 } // namespace 242 } // namespace
243 } // namespace net 243 } // namespace net
OLDNEW
« no previous file with comments | « net/base/network_change_notifier_linux.cc ('k') | net/base/server_bound_cert_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698