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

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

Issue 2437453004: Removing the dependency on //third_party/webrtc:webrtc and replacing with rtc_base. (Closed)
Patch Set: Created 4 years, 2 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
Sergey Ulanov 2016/10/19 22:04:45 FWIW I think we should be able to just remove this
joedow 2016/10/19 22:10:03 I left this file in place as Mike was interested i
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/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/command_line.h" 7 #include "base/command_line.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"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 command_line->AppendSwitch(switches::kSingleProcessTestsSwitchName); 173 command_line->AppendSwitch(switches::kSingleProcessTestsSwitchName);
174 174
175 // If the user passed in the help flag, then show the help info for this tool 175 // If the user passed in the help flag, then show the help info for this tool
176 // and 'run' the tests which will print the gtest specific help and then exit. 176 // and 'run' the tests which will print the gtest specific help and then exit.
177 // NOTE: We do this check after updating the switches as otherwise the gtest 177 // NOTE: We do this check after updating the switches as otherwise the gtest
178 // help is written in parallel with our text and can appear interleaved. 178 // help is written in parallel with our text and can appear interleaved.
179 if (command_line->HasSwitch(switches::kHelpSwitchName)) { 179 if (command_line->HasSwitch(switches::kHelpSwitchName)) {
180 PrintUsage(); 180 PrintUsage();
181 PrintJsonFileInfo(); 181 PrintJsonFileInfo();
182 PrintAuthCodeInfo(); 182 PrintAuthCodeInfo();
183 #if defined(OS_IOS)
184 return base::LaunchUnitTests(
185 argc, argv,
186 base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite)));
187 #else
183 return base::LaunchUnitTestsSerially( 188 return base::LaunchUnitTestsSerially(
184 argc, argv, 189 argc, argv,
185 base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite))); 190 base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite)));
191 #endif
186 } 192 }
187 193
188 remoting::test::AppRemotingTestDriverEnvironment::EnvironmentOptions options; 194 remoting::test::AppRemotingTestDriverEnvironment::EnvironmentOptions options;
189 195
190 // Verify we received the required input from the command line. 196 // Verify we received the required input from the command line.
191 options.user_name = 197 options.user_name =
192 command_line->GetSwitchValueASCII(switches::kUserNameSwitchName); 198 command_line->GetSwitchValueASCII(switches::kUserNameSwitchName);
193 if (options.user_name.empty()) { 199 if (options.user_name.empty()) {
194 LOG(ERROR) << "No user name passed in, can't authenticate without that!"; 200 LOG(ERROR) << "No user name passed in, can't authenticate without that!";
195 PrintUsage(); 201 PrintUsage();
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 shared_data->ShowHostAvailability(); 248 shared_data->ShowHostAvailability();
243 } 249 }
244 250
245 // Since we've successfully set up our shared_data object, we'll assign the 251 // Since we've successfully set up our shared_data object, we'll assign the
246 // value to our global* and transfer ownership to the framework. 252 // value to our global* and transfer ownership to the framework.
247 remoting::test::AppRemotingSharedData = shared_data.release(); 253 remoting::test::AppRemotingSharedData = shared_data.release();
248 testing::AddGlobalTestEnvironment(remoting::test::AppRemotingSharedData); 254 testing::AddGlobalTestEnvironment(remoting::test::AppRemotingSharedData);
249 255
250 // Because many tests may access the same remoting host(s), we need to run 256 // Because many tests may access the same remoting host(s), we need to run
251 // the tests sequentially so they do not interfere with each other. 257 // the tests sequentially so they do not interfere with each other.
258 #if defined(OS_IOS)
259 return base::LaunchUnitTests(
260 argc, argv,
261 base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite)));
262 #else
252 return base::LaunchUnitTestsSerially( 263 return base::LaunchUnitTestsSerially(
253 argc, argv, 264 argc, argv,
254 base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite))); 265 base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite)));
266 #endif
255 } 267 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698