| 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 <utility> | 5 #include <utility> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| 11 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
| 12 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" |
| 13 #include "remoting/base/rsa_key_pair.h" | 13 #include "remoting/base/rsa_key_pair.h" |
| 14 #include "remoting/protocol/authenticator_test_base.h" | 14 #include "remoting/protocol/authenticator_test_base.h" |
| 15 #include "remoting/protocol/channel_authenticator.h" | 15 #include "remoting/protocol/channel_authenticator.h" |
| 16 #include "remoting/protocol/connection_tester.h" | 16 #include "remoting/protocol/connection_tester.h" |
| 17 #include "remoting/protocol/fake_authenticator.h" | 17 #include "remoting/protocol/fake_authenticator.h" |
| 18 #include "remoting/protocol/third_party_authenticator_base.h" | 18 #include "remoting/protocol/third_party_authenticator_base.h" |
| 19 #include "remoting/protocol/third_party_client_authenticator.h" | 19 #include "remoting/protocol/third_party_client_authenticator.h" |
| 20 #include "remoting/protocol/third_party_host_authenticator.h" | 20 #include "remoting/protocol/third_party_host_authenticator.h" |
| 21 #include "remoting/protocol/token_validator.h" | 21 #include "remoting/protocol/token_validator.h" |
| 22 #include "remoting/protocol/v2_authenticator.h" | 22 #include "remoting/protocol/v2_authenticator.h" |
| 23 #include "testing/gmock/include/gmock/gmock.h" | 23 #include "testing/gmock/include/gmock/gmock.h" |
| 24 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
| 25 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" | 25 #include "third_party/libjingle_xmpp/xmllite/xmlelement.h" |
| 26 | 26 |
| 27 using testing::_; | 27 using testing::_; |
| 28 using testing::DeleteArg; | 28 using testing::DeleteArg; |
| 29 using testing::SaveArg; | 29 using testing::SaveArg; |
| 30 | 30 |
| 31 namespace { | 31 namespace { |
| 32 | 32 |
| 33 const int kMessageSize = 100; | 33 const int kMessageSize = 100; |
| 34 const int kMessages = 1; | 34 const int kMessages = 1; |
| 35 | 35 |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 ASSERT_EQ(Authenticator::PROCESSING_MESSAGE, host_->state()); | 204 ASSERT_EQ(Authenticator::PROCESSING_MESSAGE, host_->state()); |
| 205 ASSERT_NO_FATAL_FAILURE( | 205 ASSERT_NO_FATAL_FAILURE( |
| 206 token_validator_->OnTokenValidated(kSharedSecret)); | 206 token_validator_->OnTokenValidated(kSharedSecret)); |
| 207 | 207 |
| 208 // The end result is that the host rejected the fake authentication. | 208 // The end result is that the host rejected the fake authentication. |
| 209 ASSERT_EQ(Authenticator::REJECTED, client_->state()); | 209 ASSERT_EQ(Authenticator::REJECTED, client_->state()); |
| 210 } | 210 } |
| 211 | 211 |
| 212 } // namespace protocol | 212 } // namespace protocol |
| 213 } // namespace remoting | 213 } // namespace remoting |
| OLD | NEW |