summaryrefslogtreecommitdiffstats
path: root/dbus
diff options
context:
space:
mode:
authorjam <jam@chromium.org>2015-12-10 18:23:27 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-11 02:24:09 +0000
commit5ccf985d5e5b53f9196b85e147e9c290a648d7da (patch)
tree08a7bcdb2a1c2013a9feba742b920c9fbdcb3233 /dbus
parent2b9c4739f033034356590ef9b15f58d4fddcd08b (diff)
downloadchromium_src-5ccf985d5e5b53f9196b85e147e9c290a648d7da.zip
chromium_src-5ccf985d5e5b53f9196b85e147e9c290a648d7da.tar.gz
chromium_src-5ccf985d5e5b53f9196b85e147e9c290a648d7da.tar.bz2
Remove the NoAtExitBaseTestSuite anti-pattern.
A bunch of unit tests were deriving from base::TestSuite and telling it to not create an AtExitManager, while at the same time they were creating an AtExitManager. Just use the base::TestSuite directly which creates the AtExitManager. This follows similar cleanup I did in r362157. Review URL: https://codereview.chromium.org/1512053002 Cr-Commit-Position: refs/heads/master@{#364590}
Diffstat (limited to 'dbus')
-rw-r--r--dbus/run_all_unittests.cc24
1 files changed, 4 insertions, 20 deletions
diff --git a/dbus/run_all_unittests.cc b/dbus/run_all_unittests.cc
index e90849c..dac4a3c 100644
--- a/dbus/run_all_unittests.cc
+++ b/dbus/run_all_unittests.cc
@@ -2,29 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/at_exit.h"
#include "base/bind.h"
#include "base/test/launcher/unit_test_launcher.h"
#include "base/test/test_suite.h"
-namespace {
-
-class NoAtExitBaseTestSuite : public base::TestSuite {
- public:
- NoAtExitBaseTestSuite(int argc, char** argv)
- : base::TestSuite(argc, argv, false) {
- }
-};
-
-int RunTestSuite(int argc, char** argv) {
- return NoAtExitBaseTestSuite(argc, argv).Run();
-}
-
-} // namespace
-
int main(int argc, char** argv) {
- base::AtExitManager at_exit;
- return base::LaunchUnitTestsSerially(argc,
- argv,
- base::Bind(&RunTestSuite, argc, argv));
+ base::TestSuite test_suite(argc, argv);
+ return base::LaunchUnitTests(
+ argc, argv,
+ base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite)));
}