| Index: remoting/test/chromoting_test_driver.cc
|
| diff --git a/remoting/test/chromoting_test_driver.cc b/remoting/test/chromoting_test_driver.cc
|
| index 05dddc0a37bc62764861c210b04d444529ab6557..dfd92a7d8ecd8241dad68f7abefce085be38a1de 100644
|
| --- a/remoting/test/chromoting_test_driver.cc
|
| +++ b/remoting/test/chromoting_test_driver.cc
|
| @@ -17,6 +17,7 @@
|
| #include "google_apis/google_api_keys.h"
|
| #include "net/base/escape.h"
|
| #include "remoting/test/access_token_fetcher.h"
|
| +#include "remoting/test/connection_time_observer.h"
|
| #include "remoting/test/host_info.h"
|
| #include "remoting/test/host_list_fetcher.h"
|
| #include "remoting/test/refresh_token_store.h"
|
| @@ -305,12 +306,22 @@ int main(int argc, char* argv[]) {
|
| if (it != hostlist.end()) {
|
| // Host is online and ready, initiate a remote session.
|
| base::Timer timer(true, false);
|
| + remoting::test::ConnectionTimeObserver observer(&timer);
|
| + test_chromoting_client.AddRemoteConnectionObserver(&observer);
|
| +
|
| + // The timer will forcefully end the chromoting connection process in
|
| + // |kConnectionTimeoutSeconds| seconds. The set limit on time to connect
|
| + // stops the client from waiting indefinitely for a connection.
|
| timer.Start(FROM_HERE,
|
| base::TimeDelta::FromSeconds(kConnectionTimeoutSeconds),
|
| run_loop->QuitClosure());
|
| + observer.SetInitializingState();
|
| test_chromoting_client.StartConnection(
|
| it->GenerateConnectionSetupInfo(access_token, username, pin));
|
| run_loop->Run();
|
| +
|
| + observer.DisplayConnectionStats();
|
| + test_chromoting_client.RemoveRemoteConnectionObserver(&observer);
|
| test_chromoting_client.EndConnection();
|
| } else {
|
| LOG(ERROR) << "Requested host not found or not ready to connect";
|
|
|