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

Side by Side Diff: remoting/test/chromoting_test_driver.cc

Issue 2730133002: Fixing Chromoting_test_driver target (Closed)
Patch Set: Created 3 years, 9 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/command_line.h"
7 #include "base/feature_list.h" 7 #include "base/feature_list.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/strings/stringprintf.h" 11 #include "base/strings/stringprintf.h"
12 #include "base/task_scheduler/task_scheduler.h"
12 #include "base/test/launcher/unit_test_launcher.h" 13 #include "base/test/launcher/unit_test_launcher.h"
13 #include "base/test/test_suite.h" 14 #include "base/test/test_suite.h"
14 #include "base/test/test_switches.h" 15 #include "base/test/test_switches.h"
15 #include "google_apis/google_api_keys.h" 16 #include "google_apis/google_api_keys.h"
16 #include "net/base/escape.h" 17 #include "net/base/escape.h"
17 #include "remoting/test/chromoting_test_driver_environment.h" 18 #include "remoting/test/chromoting_test_driver_environment.h"
18 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
19 20
20 namespace switches { 21 namespace switches {
21 const char kAuthCodeSwitchName[] = "authcode"; 22 const char kAuthCodeSwitchName[] = "authcode";
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 return base::LaunchUnitTests( 176 return base::LaunchUnitTests(
176 argc, argv, 177 argc, argv,
177 base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite))); 178 base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite)));
178 #else 179 #else
179 return base::LaunchUnitTestsSerially( 180 return base::LaunchUnitTestsSerially(
180 argc, argv, 181 argc, argv,
181 base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite))); 182 base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite)));
182 #endif 183 #endif
183 } 184 }
184 185
186 const int kMaxBackgroundThreads = 5;
187 base::TaskScheduler::CreateAndSetSimpleTaskScheduler(kMaxBackgroundThreads);
188
185 // Update the logging verbosity level if user specified one. 189 // Update the logging verbosity level if user specified one.
186 std::string verbosity_level( 190 std::string verbosity_level(
187 command_line->GetSwitchValueASCII(switches::kLoggingLevelSwitchName)); 191 command_line->GetSwitchValueASCII(switches::kLoggingLevelSwitchName));
188 if (!verbosity_level.empty()) { 192 if (!verbosity_level.empty()) {
189 // Turn on logging for the test_driver and remoting components. 193 // Turn on logging for the test_driver and remoting components.
190 // This switch is parsed during logging::InitLogging. 194 // This switch is parsed during logging::InitLogging.
191 command_line->AppendSwitchASCII("vmodule", 195 command_line->AppendSwitchASCII("vmodule",
192 "*/remoting/*=" + verbosity_level); 196 "*/remoting/*=" + verbosity_level);
193 logging::LoggingSettings logging_settings; 197 logging::LoggingSettings logging_settings;
194 logging::InitLogging(logging_settings); 198 logging::InitLogging(logging_settings);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 #if defined(OS_IOS) 265 #if defined(OS_IOS)
262 return base::LaunchUnitTests( 266 return base::LaunchUnitTests(
263 argc, argv, 267 argc, argv,
264 base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite))); 268 base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite)));
265 #else 269 #else
266 return base::LaunchUnitTestsSerially( 270 return base::LaunchUnitTestsSerially(
267 argc, argv, 271 argc, argv,
268 base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite))); 272 base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite)));
269 #endif 273 #endif
270 } 274 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698