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

Side by Side Diff: chrome/browser/chromeos/dbus/proxy_resolution_service_provider_unittest.cc

Issue 9668018: dbus: remove service name from ExportedObject (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: pay more attention when fixing mock Created 8 years, 9 months 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 | « chrome/browser/chromeos/dbus/cros_dbus_service_unittest.cc ('k') | dbus/bus.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 // This test is relatively complicated. Here's the summary of what it does: 5 // This test is relatively complicated. Here's the summary of what it does:
6 // 6 //
7 // - Set up mock D-Bus related objects to mock out D-Bus calls. 7 // - Set up mock D-Bus related objects to mock out D-Bus calls.
8 // - Set up a mock proxy resolver to mock out the proxy resolution. 8 // - Set up a mock proxy resolver to mock out the proxy resolution.
9 // - Create ProxyResolutionServiceProvider by injecting the mocks 9 // - Create ProxyResolutionServiceProvider by injecting the mocks
10 // - Start the service provider. 10 // - Start the service provider.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 options.bus_type = dbus::Bus::SYSTEM; 73 options.bus_type = dbus::Bus::SYSTEM;
74 mock_bus_ = new dbus::MockBus(options); 74 mock_bus_ = new dbus::MockBus(options);
75 75
76 // ShutdownAndBlock() will be called in TearDown(). 76 // ShutdownAndBlock() will be called in TearDown().
77 EXPECT_CALL(*mock_bus_, ShutdownAndBlock()).WillOnce(Return()); 77 EXPECT_CALL(*mock_bus_, ShutdownAndBlock()).WillOnce(Return());
78 78
79 // Create a mock exported object that behaves as 79 // Create a mock exported object that behaves as
80 // org.chromium.CrosDBusService. 80 // org.chromium.CrosDBusService.
81 mock_exported_object_ = 81 mock_exported_object_ =
82 new dbus::MockExportedObject(mock_bus_.get(), 82 new dbus::MockExportedObject(mock_bus_.get(),
83 kLibCrosServiceName,
84 dbus::ObjectPath(kLibCrosServicePath)); 83 dbus::ObjectPath(kLibCrosServicePath));
85 84
86 // |mock_exported_object_|'s ExportMethod() will use 85 // |mock_exported_object_|'s ExportMethod() will use
87 // |MockExportedObject(). 86 // |MockExportedObject().
88 EXPECT_CALL( 87 EXPECT_CALL(
89 *mock_exported_object_, 88 *mock_exported_object_,
90 ExportMethod(_, _, _, _)).WillOnce( 89 ExportMethod(_, _, _, _)).WillOnce(
91 Invoke(this, 90 Invoke(this,
92 &ProxyResolutionServiceProviderTest::MockExportMethod)); 91 &ProxyResolutionServiceProviderTest::MockExportMethod));
93 // |mock_exported_object_|'s SendSignal() will use 92 // |mock_exported_object_|'s SendSignal() will use
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 ASSERT_TRUE(response.get()); 321 ASSERT_TRUE(response.get());
323 dbus::MessageReader reader(response.get()); 322 dbus::MessageReader reader(response.get());
324 ASSERT_FALSE(reader.HasMoreData()); 323 ASSERT_FALSE(reader.HasMoreData());
325 324
326 // Confirm that the signal is received successfully. 325 // Confirm that the signal is received successfully.
327 // The contents of the signal are checked in OnSignalReceived(). 326 // The contents of the signal are checked in OnSignalReceived().
328 ASSERT_TRUE(signal_received_successfully_); 327 ASSERT_TRUE(signal_received_successfully_);
329 } 328 }
330 329
331 } // namespace chromeos 330 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/dbus/cros_dbus_service_unittest.cc ('k') | dbus/bus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698