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

Unified Diff: remoting/test/chromoting_test_driver.cc

Issue 2542343004: Updating the Chromoting Test Driver to target the test environment (Closed)
Patch Set: Addressing feedback Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/test/app_remoting_connection_helper.cc ('k') | remoting/test/chromoting_test_driver_environment.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/test/chromoting_test_driver.cc
diff --git a/remoting/test/chromoting_test_driver.cc b/remoting/test/chromoting_test_driver.cc
index dad316a65e344971b14726a6c000da8c8004bd6d..abf7a7756f96747c87798ce1d4faee75a0ec3cb3 100644
--- a/remoting/test/chromoting_test_driver.cc
+++ b/remoting/test/chromoting_test_driver.cc
@@ -4,6 +4,7 @@
#include "base/bind.h"
#include "base/command_line.h"
+#include "base/feature_list.h"
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
@@ -25,6 +26,7 @@ const char kLoggingLevelSwitchName[] = "verbosity";
const char kPinSwitchName[] = "pin";
const char kRefreshTokenPathSwitchName[] = "refresh-token-path";
const char kSingleProcessTestsSwitchName[] = "single-process-tests";
+const char kTestEnvironmentSwitchName[] = "use-test-env";
const char kUserNameSwitchName[] = "username";
}
@@ -74,6 +76,10 @@ void PrintUsage() {
switches::kRefreshTokenPathSwitchName);
printf(" %s: Specifies the optional logging level of the tool (0-3)."
" [default: off]\n", switches::kLoggingLevelSwitchName);
+ printf(
+ " %s: Specifies that the test environment APIs should be used."
+ " [default: false]\n",
+ switches::kTestEnvironmentSwitchName);
}
void PrintAuthCodeInfo() {
@@ -138,6 +144,7 @@ void PrintJsonFileInfo() {
int main(int argc, char* argv[]) {
base::TestSuite test_suite(argc, argv);
base::MessageLoopForIO message_loop;
+ base::FeatureList::InitializeInstance(std::string(), std::string());
if (!base::CommandLine::InitializedForCurrentProcess()) {
if (!base::CommandLine::Init(argc, argv)) {
@@ -221,6 +228,9 @@ int main(int argc, char* argv[]) {
options.pin = command_line->GetSwitchValueASCII(switches::kPinSwitchName);
+ options.use_test_environment =
+ command_line->HasSwitch(switches::kTestEnvironmentSwitchName);
+
// Create and register our global test data object. It will handle
// retrieving an access token or host list for the user. The GTest framework
// will own the lifetime of this object once it is registered below.
« no previous file with comments | « remoting/test/app_remoting_connection_helper.cc ('k') | remoting/test/chromoting_test_driver_environment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698