OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/host/security_key/security_key_auth_handler.h" | 5 #include "remoting/host/security_key/security_key_auth_handler.h" |
6 | 6 |
7 #include <cstdint> | 7 #include <cstdint> |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 testing::NiceMock<MockClientSessionDetails> mock_client_session_details_; | 115 testing::NiceMock<MockClientSessionDetails> mock_client_session_details_; |
116 | 116 |
117 DISALLOW_COPY_AND_ASSIGN(SecurityKeyAuthHandlerWinTest); | 117 DISALLOW_COPY_AND_ASSIGN(SecurityKeyAuthHandlerWinTest); |
118 }; | 118 }; |
119 | 119 |
120 SecurityKeyAuthHandlerWinTest::SecurityKeyAuthHandlerWinTest() | 120 SecurityKeyAuthHandlerWinTest::SecurityKeyAuthHandlerWinTest() |
121 : run_loop_(new base::RunLoop()) { | 121 : run_loop_(new base::RunLoop()) { |
122 auth_handler_ = remoting::SecurityKeyAuthHandler::Create( | 122 auth_handler_ = remoting::SecurityKeyAuthHandler::Create( |
123 &mock_client_session_details_, | 123 &mock_client_session_details_, |
124 base::Bind(&SecurityKeyAuthHandlerWinTest::SendMessageToClient, | 124 base::Bind(&SecurityKeyAuthHandlerWinTest::SendMessageToClient, |
125 base::Unretained(this))); | 125 base::Unretained(this)), |
| 126 /*file_task_runner=*/nullptr); |
126 } | 127 } |
127 | 128 |
128 SecurityKeyAuthHandlerWinTest::~SecurityKeyAuthHandlerWinTest() {} | 129 SecurityKeyAuthHandlerWinTest::~SecurityKeyAuthHandlerWinTest() {} |
129 | 130 |
130 void SecurityKeyAuthHandlerWinTest::OperationComplete() { | 131 void SecurityKeyAuthHandlerWinTest::OperationComplete() { |
131 run_loop_->Quit(); | 132 run_loop_->Quit(); |
132 } | 133 } |
133 | 134 |
134 void SecurityKeyAuthHandlerWinTest::WaitForOperationComplete() { | 135 void SecurityKeyAuthHandlerWinTest::WaitForOperationComplete() { |
135 run_loop_->Run(); | 136 run_loop_->Run(); |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 ASSERT_TRUE(fake_ipc_client.ConnectViaIpc(channel_name)); | 546 ASSERT_TRUE(fake_ipc_client.ConnectViaIpc(channel_name)); |
546 // Wait for the error callback to be signaled. | 547 // Wait for the error callback to be signaled. |
547 WaitForOperationComplete(); | 548 WaitForOperationComplete(); |
548 | 549 |
549 // Verify the connection was not set up. | 550 // Verify the connection was not set up. |
550 ASSERT_FALSE(auth_handler_->IsValidConnectionId(kConnectionId1)); | 551 ASSERT_FALSE(auth_handler_->IsValidConnectionId(kConnectionId1)); |
551 ASSERT_EQ(0u, auth_handler_->GetActiveConnectionCountForTest()); | 552 ASSERT_EQ(0u, auth_handler_->GetActiveConnectionCountForTest()); |
552 } | 553 } |
553 | 554 |
554 } // namespace remoting | 555 } // namespace remoting |
OLD | NEW |