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

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

Issue 1238343002: Added ConnectionTimeObserver to calculate the times to authenticate and connect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed unused headers. Created 5 years, 4 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 | « remoting/test/BUILD.gn ('k') | remoting/test/connection_time_observer.h » ('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 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/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 // NOTE: We do this check after updating the switches as otherwise the gtest 176 // NOTE: We do this check after updating the switches as otherwise the gtest
177 // help is written in parallel with our text and can appear interleaved. 177 // help is written in parallel with our text and can appear interleaved.
178 if (command_line->HasSwitch(switches::kHelpSwitchName)) { 178 if (command_line->HasSwitch(switches::kHelpSwitchName)) {
179 PrintUsage(); 179 PrintUsage();
180 PrintJsonFileInfo(); 180 PrintJsonFileInfo();
181 PrintAuthCodeInfo(); 181 PrintAuthCodeInfo();
182 return base::LaunchUnitTestsSerially( 182 return base::LaunchUnitTestsSerially(
183 argc, argv, base::Bind(&NoAtExitBaseTestSuite::RunTestSuite, argc, argv)); 183 argc, argv, base::Bind(&NoAtExitBaseTestSuite::RunTestSuite, argc, argv));
184 } 184 }
185 185
186 // Update the logging verbosity level is user specified one. 186 // Update the logging verbosity level if user specified one.
187 std::string verbosity_level( 187 std::string verbosity_level(
188 command_line->GetSwitchValueASCII(switches::kLoggingLevelSwitchName)); 188 command_line->GetSwitchValueASCII(switches::kLoggingLevelSwitchName));
189 if (!verbosity_level.empty()) { 189 if (!verbosity_level.empty()) {
190 // Turn on logging for the test_driver and remoting components. 190 // Turn on logging for the test_driver and remoting components.
191 // This switch is parsed during logging::InitLogging. 191 // This switch is parsed during logging::InitLogging.
192 command_line->AppendSwitchASCII("vmodule", 192 command_line->AppendSwitchASCII("vmodule",
193 "*/remoting/*=" + verbosity_level); 193 "*/remoting/*=" + verbosity_level);
194 logging::LoggingSettings logging_settings; 194 logging::LoggingSettings logging_settings;
195 logging::InitLogging(logging_settings); 195 logging::InitLogging(logging_settings);
196 } 196 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 // Since we've successfully set up our shared_data object, we'll assign the 239 // Since we've successfully set up our shared_data object, we'll assign the
240 // value to our global* and transfer ownership to the framework. 240 // value to our global* and transfer ownership to the framework.
241 remoting::test::g_chromoting_shared_data = shared_data.release(); 241 remoting::test::g_chromoting_shared_data = shared_data.release();
242 testing::AddGlobalTestEnvironment(remoting::test::g_chromoting_shared_data); 242 testing::AddGlobalTestEnvironment(remoting::test::g_chromoting_shared_data);
243 243
244 // Running the tests serially will avoid clients from connecting to the same 244 // Running the tests serially will avoid clients from connecting to the same
245 // host. 245 // host.
246 return base::LaunchUnitTestsSerially( 246 return base::LaunchUnitTestsSerially(
247 argc, argv, base::Bind(&NoAtExitBaseTestSuite::RunTestSuite, argc, argv)); 247 argc, argv, base::Bind(&NoAtExitBaseTestSuite::RunTestSuite, argc, argv));
248 } 248 }
OLDNEW
« no previous file with comments | « remoting/test/BUILD.gn ('k') | remoting/test/connection_time_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698