| 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 <utility> | 5 #include <utility> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 MockVideoStub client_video_stub_; | 170 MockVideoStub client_video_stub_; |
| 171 scoped_ptr<ConnectionToHost> client_connection_; | 171 scoped_ptr<ConnectionToHost> client_connection_; |
| 172 FakeSession* client_session_; // Owned by |client_connection_|. | 172 FakeSession* client_session_; // Owned by |client_connection_|. |
| 173 scoped_ptr<FakeSession> owned_client_session_; | 173 scoped_ptr<FakeSession> owned_client_session_; |
| 174 bool client_connected_ = false; | 174 bool client_connected_ = false; |
| 175 | 175 |
| 176 private: | 176 private: |
| 177 DISALLOW_COPY_AND_ASSIGN(ConnectionTest); | 177 DISALLOW_COPY_AND_ASSIGN(ConnectionTest); |
| 178 }; | 178 }; |
| 179 | 179 |
| 180 INSTANTIATE_TEST_CASE_P(Ice, ConnectionTest, ::testing::Values(false)); | 180 // TODO(sergeyu): Disabled due to failures on Vista bots. See |
| 181 // https://crbug.com/573366. |
| 182 // INSTANTIATE_TEST_CASE_P(Ice, ConnectionTest, ::testing::Values(false)); |
| 181 INSTANTIATE_TEST_CASE_P(Webrtc, ConnectionTest, ::testing::Values(true)); | 183 INSTANTIATE_TEST_CASE_P(Webrtc, ConnectionTest, ::testing::Values(true)); |
| 182 | 184 |
| 183 TEST_P(ConnectionTest, RejectConnection) { | 185 TEST_P(ConnectionTest, RejectConnection) { |
| 184 EXPECT_CALL(client_event_handler_, | 186 EXPECT_CALL(client_event_handler_, |
| 185 OnConnectionState(ConnectionToHost::CONNECTING, OK)); | 187 OnConnectionState(ConnectionToHost::CONNECTING, OK)); |
| 186 EXPECT_CALL(client_event_handler_, | 188 EXPECT_CALL(client_event_handler_, |
| 187 OnConnectionState(ConnectionToHost::CLOSED, OK)); | 189 OnConnectionState(ConnectionToHost::CLOSED, OK)); |
| 188 | 190 |
| 189 client_connection_->Connect( | 191 client_connection_->Connect( |
| 190 std::move(owned_client_session_), | 192 std::move(owned_client_session_), |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 EXPECT_CALL(host_input_stub_, InjectKeyEvent(EqualsKeyEvent(event))); | 234 EXPECT_CALL(host_input_stub_, InjectKeyEvent(EqualsKeyEvent(event))); |
| 233 | 235 |
| 234 // Send capabilities from the client. | 236 // Send capabilities from the client. |
| 235 client_connection_->input_stub()->InjectKeyEvent(event); | 237 client_connection_->input_stub()->InjectKeyEvent(event); |
| 236 | 238 |
| 237 base::RunLoop().RunUntilIdle(); | 239 base::RunLoop().RunUntilIdle(); |
| 238 } | 240 } |
| 239 | 241 |
| 240 } // namespace protocol | 242 } // namespace protocol |
| 241 } // namespace remoting | 243 } // namespace remoting |
| OLD | NEW |