| OLD | NEW |
| 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/chromoting_test_fixture.h" | 5 #include "remoting/test/chromoting_test_fixture.h" |
| 6 #include "remoting/test/connection_time_observer.h" | 6 #include "remoting/test/connection_time_observer.h" |
| 7 | 7 |
| 8 namespace { | 8 namespace { |
| 9 const base::TimeDelta kPinBasedMaxConnectionTimeInSeconds = | 9 const base::TimeDelta kPinBasedMaxConnectionTimeInSeconds = |
| 10 base::TimeDelta::FromSeconds(5); | 10 base::TimeDelta::FromSeconds(10); |
| 11 } | 11 } |
| 12 | 12 |
| 13 namespace remoting { | 13 namespace remoting { |
| 14 namespace test { | 14 namespace test { |
| 15 | 15 |
| 16 // Note: Make sure to restart the host before running this test. Connecting to | 16 // Note: Make sure to restart the host before running this test. Connecting to |
| 17 // a previously connected host will output the time to reconnect versus the time | 17 // a previously connected host will output the time to reconnect versus the time |
| 18 // to connect. | 18 // to connect. |
| 19 TEST_F(ChromotingTestFixture, TestMeasurePinBasedAuthentication) { | 19 TEST_F(ChromotingTestFixture, TestMeasurePinBasedAuthentication) { |
| 20 bool connected = ConnectToHost(kPinBasedMaxConnectionTimeInSeconds); | 20 bool connected = ConnectToHost(kPinBasedMaxConnectionTimeInSeconds); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 47 Disconnect(); | 47 Disconnect(); |
| 48 EXPECT_FALSE(connection_time_observer_->GetStateTransitionTime( | 48 EXPECT_FALSE(connection_time_observer_->GetStateTransitionTime( |
| 49 protocol::ConnectionToHost::State::INITIALIZING, | 49 protocol::ConnectionToHost::State::INITIALIZING, |
| 50 protocol::ConnectionToHost::State::CLOSED).is_max()); | 50 protocol::ConnectionToHost::State::CLOSED).is_max()); |
| 51 | 51 |
| 52 connection_time_observer_->DisplayConnectionStats(); | 52 connection_time_observer_->DisplayConnectionStats(); |
| 53 } | 53 } |
| 54 | 54 |
| 55 } // namespace test | 55 } // namespace test |
| 56 } // namespace remoting | 56 } // namespace remoting |
| OLD | NEW |