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

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

Issue 1101763002: Update {virtual,override} to follow C++11 style in chromeos. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « no previous file | chromeos/dbus/shill_client_unittest_base.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 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/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "chromeos/dbus/nfc_adapter_client.h" 7 #include "chromeos/dbus/nfc_adapter_client.h"
8 #include "chromeos/dbus/nfc_client_helpers.h" 8 #include "chromeos/dbus/nfc_client_helpers.h"
9 #include "chromeos/dbus/nfc_device_client.h" 9 #include "chromeos/dbus/nfc_device_client.h"
10 #include "chromeos/dbus/nfc_manager_client.h" 10 #include "chromeos/dbus/nfc_manager_client.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 MOCK_METHOD1(TagRemoved, void(const dbus::ObjectPath&)); 81 MOCK_METHOD1(TagRemoved, void(const dbus::ObjectPath&));
82 MOCK_METHOD2(TagPropertyChanged, void(const dbus::ObjectPath&, 82 MOCK_METHOD2(TagPropertyChanged, void(const dbus::ObjectPath&,
83 const std::string&)); 83 const std::string&));
84 }; 84 };
85 85
86 } // namespace 86 } // namespace
87 87
88 class NfcClientTest : public testing::Test { 88 class NfcClientTest : public testing::Test {
89 public: 89 public:
90 NfcClientTest() : response_(NULL) {} 90 NfcClientTest() : response_(NULL) {}
91 virtual ~NfcClientTest() {} 91 ~NfcClientTest() override {}
92 92
93 virtual void SetUp() override { 93 void SetUp() override {
94 // Create the mock bus. 94 // Create the mock bus.
95 dbus::Bus::Options options; 95 dbus::Bus::Options options;
96 options.bus_type = dbus::Bus::SYSTEM; 96 options.bus_type = dbus::Bus::SYSTEM;
97 mock_bus_ = new dbus::MockBus(options); 97 mock_bus_ = new dbus::MockBus(options);
98 98
99 // Create the mock proxies. 99 // Create the mock proxies.
100 mock_manager_proxy_ = new dbus::MockObjectProxy( 100 mock_manager_proxy_ = new dbus::MockObjectProxy(
101 mock_bus_.get(), 101 mock_bus_.get(),
102 kTestServiceName, 102 kTestServiceName,
103 dbus::ObjectPath(kTestManagerPath)); 103 dbus::ObjectPath(kTestManagerPath));
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 record_client_->Init(mock_bus_.get()); 215 record_client_->Init(mock_bus_.get());
216 manager_client_->AddObserver(&mock_manager_observer_); 216 manager_client_->AddObserver(&mock_manager_observer_);
217 adapter_client_->AddObserver(&mock_adapter_observer_); 217 adapter_client_->AddObserver(&mock_adapter_observer_);
218 device_client_->AddObserver(&mock_device_observer_); 218 device_client_->AddObserver(&mock_device_observer_);
219 tag_client_->AddObserver(&mock_tag_observer_); 219 tag_client_->AddObserver(&mock_tag_observer_);
220 record_client_->AddObserver(&mock_record_observer_); 220 record_client_->AddObserver(&mock_record_observer_);
221 221
222 message_loop_.RunUntilIdle(); 222 message_loop_.RunUntilIdle();
223 } 223 }
224 224
225 virtual void TearDown() override { 225 void TearDown() override {
226 tag_client_->RemoveObserver(&mock_tag_observer_); 226 tag_client_->RemoveObserver(&mock_tag_observer_);
227 device_client_->RemoveObserver(&mock_device_observer_); 227 device_client_->RemoveObserver(&mock_device_observer_);
228 adapter_client_->RemoveObserver(&mock_adapter_observer_); 228 adapter_client_->RemoveObserver(&mock_adapter_observer_);
229 manager_client_->RemoveObserver(&mock_manager_observer_); 229 manager_client_->RemoveObserver(&mock_manager_observer_);
230 mock_bus_->ShutdownAndBlock(); 230 mock_bus_->ShutdownAndBlock();
231 } 231 }
232 232
233 void SimulateAdaptersChanged( 233 void SimulateAdaptersChanged(
234 const ObjectPathVector& adapter_paths) { 234 const ObjectPathVector& adapter_paths) {
235 NfcManagerClient::Properties* properties = 235 NfcManagerClient::Properties* properties =
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 EXPECT_CALL(mock_tag_observer_, 873 EXPECT_CALL(mock_tag_observer_,
874 TagRemoved(dbus::ObjectPath(kTestTagPath1))); 874 TagRemoved(dbus::ObjectPath(kTestTagPath1)));
875 EXPECT_CALL(mock_record_observer_, 875 EXPECT_CALL(mock_record_observer_,
876 RecordRemoved(dbus::ObjectPath(kTestRecordPath2))); 876 RecordRemoved(dbus::ObjectPath(kTestRecordPath2)));
877 EXPECT_CALL(mock_record_observer_, 877 EXPECT_CALL(mock_record_observer_,
878 RecordRemoved(dbus::ObjectPath(kTestRecordPath3))); 878 RecordRemoved(dbus::ObjectPath(kTestRecordPath3)));
879 SimulateAdaptersChanged(object_paths); 879 SimulateAdaptersChanged(object_paths);
880 } 880 }
881 881
882 } // namespace chromeos 882 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chromeos/dbus/shill_client_unittest_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698