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

Side by Side Diff: dbus/property_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 5 years, 12 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 | « dbus/object_proxy_unittest.cc ('k') | dbus/signal_sender_verification_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 (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 "dbus/property.h" 5 #include "dbus/property.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 "org.chromium.TestInterface", 42 "org.chromium.TestInterface",
43 property_changed_callback) { 43 property_changed_callback) {
44 RegisterProperty("Name", &name); 44 RegisterProperty("Name", &name);
45 RegisterProperty("Version", &version); 45 RegisterProperty("Version", &version);
46 RegisterProperty("Methods", &methods); 46 RegisterProperty("Methods", &methods);
47 RegisterProperty("Objects", &objects); 47 RegisterProperty("Objects", &objects);
48 RegisterProperty("Bytes", &bytes); 48 RegisterProperty("Bytes", &bytes);
49 } 49 }
50 }; 50 };
51 51
52 virtual void SetUp() { 52 void SetUp() override {
53 // Make the main thread not to allow IO. 53 // Make the main thread not to allow IO.
54 base::ThreadRestrictions::SetIOAllowed(false); 54 base::ThreadRestrictions::SetIOAllowed(false);
55 55
56 // Start the D-Bus thread. 56 // Start the D-Bus thread.
57 dbus_thread_.reset(new base::Thread("D-Bus Thread")); 57 dbus_thread_.reset(new base::Thread("D-Bus Thread"));
58 base::Thread::Options thread_options; 58 base::Thread::Options thread_options;
59 thread_options.message_loop_type = base::MessageLoop::TYPE_IO; 59 thread_options.message_loop_type = base::MessageLoop::TYPE_IO;
60 ASSERT_TRUE(dbus_thread_->StartWithOptions(thread_options)); 60 ASSERT_TRUE(dbus_thread_->StartWithOptions(thread_options));
61 61
62 // Start the test service, using the D-Bus thread. 62 // Start the test service, using the D-Bus thread.
(...skipping 17 matching lines...) Expand all
80 80
81 // Create the properties structure 81 // Create the properties structure
82 properties_.reset(new Properties( 82 properties_.reset(new Properties(
83 object_proxy_, 83 object_proxy_,
84 base::Bind(&PropertyTest::OnPropertyChanged, 84 base::Bind(&PropertyTest::OnPropertyChanged,
85 base::Unretained(this)))); 85 base::Unretained(this))));
86 properties_->ConnectSignals(); 86 properties_->ConnectSignals();
87 properties_->GetAll(); 87 properties_->GetAll();
88 } 88 }
89 89
90 virtual void TearDown() { 90 void TearDown() override {
91 bus_->ShutdownOnDBusThreadAndBlock(); 91 bus_->ShutdownOnDBusThreadAndBlock();
92 92
93 // Shut down the service. 93 // Shut down the service.
94 test_service_->ShutdownAndBlock(); 94 test_service_->ShutdownAndBlock();
95 95
96 // Reset to the default. 96 // Reset to the default.
97 base::ThreadRestrictions::SetIOAllowed(true); 97 base::ThreadRestrictions::SetIOAllowed(true);
98 98
99 // Stopping a thread is considered an IO operation, so do this after 99 // Stopping a thread is considered an IO operation, so do this after
100 // allowing IO. 100 // allowing IO.
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 "Set")); 271 "Set"));
272 WaitForCallback("Set"); 272 WaitForCallback("Set");
273 273
274 // TestService sends a property update. 274 // TestService sends a property update.
275 WaitForUpdates(1); 275 WaitForUpdates(1);
276 276
277 EXPECT_EQ("NewService", properties_->name.value()); 277 EXPECT_EQ("NewService", properties_->name.value());
278 } 278 }
279 279
280 } // namespace dbus 280 } // namespace dbus
OLDNEW
« no previous file with comments | « dbus/object_proxy_unittest.cc ('k') | dbus/signal_sender_verification_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698