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

Side by Side Diff: dbus/object_proxy_unittest.cc

Issue 802213003: Standardize usage of virtual/override/final specifiers in dbus/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « dbus/object_manager_unittest.cc ('k') | dbus/property_unittest.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "dbus/bus.h" 8 #include "dbus/bus.h"
9 #include "dbus/object_proxy.h" 9 #include "dbus/object_proxy.h"
10 #include "dbus/test_service.h" 10 #include "dbus/test_service.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace dbus { 13 namespace dbus {
14 namespace { 14 namespace {
15 15
16 class ObjectProxyTest : public testing::Test { 16 class ObjectProxyTest : public testing::Test {
17 protected: 17 protected:
18 virtual void SetUp() override { 18 void SetUp() override {
19 Bus::Options bus_options; 19 Bus::Options bus_options;
20 bus_options.bus_type = Bus::SESSION; 20 bus_options.bus_type = Bus::SESSION;
21 bus_options.connection_type = Bus::PRIVATE; 21 bus_options.connection_type = Bus::PRIVATE;
22 bus_ = new Bus(bus_options); 22 bus_ = new Bus(bus_options);
23 23
24 object_proxy_ = bus_->GetObjectProxy( 24 object_proxy_ = bus_->GetObjectProxy(
25 "org.chromium.TestService", ObjectPath("/org/chromium/TestObject")); 25 "org.chromium.TestService", ObjectPath("/org/chromium/TestObject"));
26 } 26 }
27 27
28 virtual void TearDown() override { 28 void TearDown() override { bus_->ShutdownAndBlock(); }
29 bus_->ShutdownAndBlock();
30 }
31 29
32 base::MessageLoopForIO message_loop_; 30 base::MessageLoopForIO message_loop_;
33 scoped_refptr<Bus> bus_; 31 scoped_refptr<Bus> bus_;
34 ObjectProxy* object_proxy_; 32 ObjectProxy* object_proxy_;
35 }; 33 };
36 34
37 // Used as a WaitForServiceToBeAvailableCallback. 35 // Used as a WaitForServiceToBeAvailableCallback.
38 void OnServiceIsAvailable(scoped_ptr<base::RunLoop>* run_loop, 36 void OnServiceIsAvailable(scoped_ptr<base::RunLoop>* run_loop,
39 bool service_is_available) { 37 bool service_is_available) {
40 EXPECT_TRUE(service_is_available); 38 EXPECT_TRUE(service_is_available);
(...skipping 26 matching lines...) Expand all
67 base::Bind(&OnServiceIsAvailable, &run_loop)); 65 base::Bind(&OnServiceIsAvailable, &run_loop));
68 run_loop->Run(); 66 run_loop->Run();
69 67
70 // Shut down the service. 68 // Shut down the service.
71 test_service.ShutdownAndBlock(); 69 test_service.ShutdownAndBlock();
72 test_service.Stop(); 70 test_service.Stop();
73 } 71 }
74 72
75 } // namespace 73 } // namespace
76 } // namespace dbus 74 } // namespace dbus
OLDNEW
« no previous file with comments | « dbus/object_manager_unittest.cc ('k') | dbus/property_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698