OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "net/base/net_errors.h" | 6 #include "net/base/net_errors.h" |
7 #include "remoting/base/rsa_key_pair.h" | 7 #include "remoting/base/rsa_key_pair.h" |
8 #include "remoting/protocol/authenticator_test_base.h" | 8 #include "remoting/protocol/authenticator_test_base.h" |
9 #include "remoting/protocol/channel_authenticator.h" | 9 #include "remoting/protocol/channel_authenticator.h" |
10 #include "remoting/protocol/connection_tester.h" | 10 #include "remoting/protocol/connection_tester.h" |
11 #include "remoting/protocol/fake_authenticator.h" | 11 #include "remoting/protocol/fake_authenticator.h" |
12 #include "remoting/protocol/third_party_authenticator_base.h" | 12 #include "remoting/protocol/third_party_authenticator_base.h" |
13 #include "remoting/protocol/third_party_client_authenticator.h" | 13 #include "remoting/protocol/third_party_client_authenticator.h" |
14 #include "remoting/protocol/third_party_host_authenticator.h" | 14 #include "remoting/protocol/third_party_host_authenticator.h" |
15 #include "remoting/protocol/token_validator.h" | 15 #include "remoting/protocol/token_validator.h" |
16 #include "testing/gmock/include/gmock/gmock.h" | 16 #include "testing/gmock/include/gmock/gmock.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 #include "third_party/libjingle/source/talk/xmllite/xmlelement.h" | 18 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" |
19 | 19 |
20 using testing::_; | 20 using testing::_; |
21 using testing::DeleteArg; | 21 using testing::DeleteArg; |
22 using testing::SaveArg; | 22 using testing::SaveArg; |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 const int kMessageSize = 100; | 26 const int kMessageSize = 100; |
27 const int kMessages = 1; | 27 const int kMessages = 1; |
28 | 28 |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 ASSERT_EQ(Authenticator::PROCESSING_MESSAGE, host_->state()); | 209 ASSERT_EQ(Authenticator::PROCESSING_MESSAGE, host_->state()); |
210 ASSERT_NO_FATAL_FAILURE( | 210 ASSERT_NO_FATAL_FAILURE( |
211 token_validator_->OnTokenValidated(kSharedSecret)); | 211 token_validator_->OnTokenValidated(kSharedSecret)); |
212 | 212 |
213 // The end result is that the host rejected the fake authentication. | 213 // The end result is that the host rejected the fake authentication. |
214 ASSERT_EQ(Authenticator::REJECTED, client_->state()); | 214 ASSERT_EQ(Authenticator::REJECTED, client_->state()); |
215 } | 215 } |
216 | 216 |
217 } // namespace protocol | 217 } // namespace protocol |
218 } // namespace remoting | 218 } // namespace remoting |
OLD | NEW |