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

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

Issue 1585493002: [mojo] Ports EDK (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
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/bind.h"
6 #include "base/command_line.h"
6 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
7 #include "base/macros.h" 8 #include "base/macros.h"
8 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
9 #include "base/metrics/statistics_recorder.h" 10 #include "base/metrics/statistics_recorder.h"
10 #include "base/path_service.h" 11 #include "base/path_service.h"
11 #include "base/test/launcher/unit_test_launcher.h" 12 #include "base/test/launcher/unit_test_launcher.h"
12 #include "base/test/test_suite.h" 13 #include "base/test/test_suite.h"
13 #include "build/build_config.h" 14 #include "build/build_config.h"
14 #include "components/content_settings/core/common/content_settings_pattern.h" 15 #include "components/content_settings/core/common/content_settings_pattern.h"
15 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 #endif 131 #endif
131 132
132 DISALLOW_COPY_AND_ASSIGN(ComponentsUnitTestEventListener); 133 DISALLOW_COPY_AND_ASSIGN(ComponentsUnitTestEventListener);
133 }; 134 };
134 135
135 } // namespace 136 } // namespace
136 137
137 int main(int argc, char** argv) { 138 int main(int argc, char** argv) {
138 ComponentsTestSuite test_suite(argc, argv); 139 ComponentsTestSuite test_suite(argc, argv);
139 140
141 // TODO(use_chrome_edk): This flag will go away and be default behavior soon,
142 // but we explicitly add it here for test coverage.
143 base::CommandLine::ForCurrentProcess()->AppendSwitch("use-new-edk");
144
140 // The listener will set up common test environment for all components unit 145 // The listener will set up common test environment for all components unit
141 // tests. 146 // tests.
142 testing::TestEventListeners& listeners = 147 testing::TestEventListeners& listeners =
143 testing::UnitTest::GetInstance()->listeners(); 148 testing::UnitTest::GetInstance()->listeners();
144 listeners.Append(new ComponentsUnitTestEventListener()); 149 listeners.Append(new ComponentsUnitTestEventListener());
145 150
146 #if defined(OS_CHROMEOS) 151 #if defined(OS_CHROMEOS)
147 mojo::embedder::Init(); 152 mojo::embedder::Init();
148 #endif 153 #endif
149 154
150 return base::LaunchUnitTests( 155 return base::LaunchUnitTests(
151 argc, argv, base::Bind(&base::TestSuite::Run, 156 argc, argv, base::Bind(&base::TestSuite::Run,
152 base::Unretained(&test_suite))); 157 base::Unretained(&test_suite)));
153 } 158 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698