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

Side by Side Diff: components/test/run_all_unittests.cc

Issue 23442019: Convert most run_all_unittests.cc files to use new unit test launcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: trybots Created 7 years, 3 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/test/base/run_all_unittests.cc ('k') | content/test/run_all_unittests.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 "base/bind.h"
5 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
6 #include "base/test/test_suite.h" 7 #include "base/test/test_suite.h"
8 #include "base/test/unit_test_launcher.h"
7 #include "content/public/test/test_content_client_initializer.h" 9 #include "content/public/test/test_content_client_initializer.h"
8 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
9 11
10 namespace components { 12 namespace components {
11 13
12 class ComponentsUnitTestEventListener : public testing::EmptyTestEventListener { 14 class ComponentsUnitTestEventListener : public testing::EmptyTestEventListener {
13 public: 15 public:
14 ComponentsUnitTestEventListener() {} 16 ComponentsUnitTestEventListener() {}
15 virtual ~ComponentsUnitTestEventListener() {} 17 virtual ~ComponentsUnitTestEventListener() {}
16 18
(...skipping 15 matching lines...) Expand all
32 34
33 int main(int argc, char** argv) { 35 int main(int argc, char** argv) {
34 base::TestSuite test_suite(argc, argv); 36 base::TestSuite test_suite(argc, argv);
35 37
36 // The listener will set up common test environment for all components unit 38 // The listener will set up common test environment for all components unit
37 // tests. 39 // tests.
38 testing::TestEventListeners& listeners = 40 testing::TestEventListeners& listeners =
39 testing::UnitTest::GetInstance()->listeners(); 41 testing::UnitTest::GetInstance()->listeners();
40 listeners.Append(new components::ComponentsUnitTestEventListener()); 42 listeners.Append(new components::ComponentsUnitTestEventListener());
41 43
42 return test_suite.Run(); 44 return base::LaunchUnitTests(
45 argc, argv, base::Bind(&base::TestSuite::Run,
46 base::Unretained(&test_suite)));
43 } 47 }
OLDNEW
« no previous file with comments | « chrome/test/base/run_all_unittests.cc ('k') | content/test/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698