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

Side by Side Diff: remoting/test/app_remoting_connection_helper.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 unified diff | Download patch
« no previous file with comments | « remoting/test/access_token_fetcher.cc ('k') | remoting/test/chromoting_test_driver.cc » ('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 "remoting/test/app_remoting_connection_helper.h" 5 #include "remoting/test/app_remoting_connection_helper.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 DCHECK(!run_loop_ || !run_loop_->running()); 69 DCHECK(!run_loop_ || !run_loop_->running());
70 run_loop_.reset(new base::RunLoop()); 70 run_loop_.reset(new base::RunLoop());
71 71
72 // We will wait up to 30 seconds to complete the remote connection and for the 72 // We will wait up to 30 seconds to complete the remote connection and for the
73 // main application window to become visible. 73 // main application window to become visible.
74 DCHECK(!timer_->IsRunning()); 74 DCHECK(!timer_->IsRunning());
75 timer_->Start(FROM_HERE, base::TimeDelta::FromSeconds(30), 75 timer_->Start(FROM_HERE, base::TimeDelta::FromSeconds(30),
76 run_loop_->QuitClosure()); 76 run_loop_->QuitClosure());
77 77
78 client_->StartConnection(remote_host_info.GenerateConnectionSetupInfo( 78 client_->StartConnection(
79 AppRemotingSharedData->access_token(), 79 /*use_test_api_settings=*/false,
80 AppRemotingSharedData->user_name())); 80 remote_host_info.GenerateConnectionSetupInfo(
81 AppRemotingSharedData->access_token(),
82 AppRemotingSharedData->user_name()));
81 83
82 run_loop_->Run(); 84 run_loop_->Run();
83 timer_->Stop(); 85 timer_->Stop();
84 86
85 if (connection_is_ready_for_tests_) { 87 if (connection_is_ready_for_tests_) {
86 return true; 88 return true;
87 } else { 89 } else {
88 client_->EndConnection(); 90 client_->EndConnection();
89 return false; 91 return false;
90 } 92 }
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 DCHECK(run_loop_); 215 DCHECK(run_loop_);
214 // Now that the main window is visible, give the app some time to settle 216 // Now that the main window is visible, give the app some time to settle
215 // before signaling that it is ready to run tests. 217 // before signaling that it is ready to run tests.
216 timer_->Start(FROM_HERE, base::TimeDelta::FromSeconds(2), 218 timer_->Start(FROM_HERE, base::TimeDelta::FromSeconds(2),
217 run_loop_->QuitClosure()); 219 run_loop_->QuitClosure());
218 } 220 }
219 } 221 }
220 222
221 } // namespace test 223 } // namespace test
222 } // namespace remoting 224 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/test/access_token_fetcher.cc ('k') | remoting/test/chromoting_test_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698