OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/protocol/v2_authenticator.h" | 5 #include "remoting/protocol/v2_authenticator.h" |
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/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
11 #include "remoting/base/rsa_key_pair.h" | 11 #include "remoting/base/rsa_key_pair.h" |
12 #include "remoting/protocol/authenticator_test_base.h" | 12 #include "remoting/protocol/authenticator_test_base.h" |
13 #include "remoting/protocol/channel_authenticator.h" | 13 #include "remoting/protocol/channel_authenticator.h" |
14 #include "remoting/protocol/connection_tester.h" | 14 #include "remoting/protocol/connection_tester.h" |
15 #include "testing/gmock/include/gmock/gmock.h" | 15 #include "testing/gmock/include/gmock/gmock.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" | 17 #include "third_party/libjingle_xmpp/xmllite/xmlelement.h" |
18 | 18 |
19 using testing::_; | 19 using testing::_; |
20 using testing::DeleteArg; | 20 using testing::DeleteArg; |
21 using testing::SaveArg; | 21 using testing::SaveArg; |
22 | 22 |
23 namespace remoting { | 23 namespace remoting { |
24 namespace protocol { | 24 namespace protocol { |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 ASSERT_TRUE(message.get()); | 88 ASSERT_TRUE(message.get()); |
89 | 89 |
90 ASSERT_EQ(Authenticator::WAITING_MESSAGE, client_->state()); | 90 ASSERT_EQ(Authenticator::WAITING_MESSAGE, client_->state()); |
91 host_->ProcessMessage(message.get(), base::Bind(&base::DoNothing)); | 91 host_->ProcessMessage(message.get(), base::Bind(&base::DoNothing)); |
92 // This assumes that V2Authenticator::ProcessMessage runs synchronously. | 92 // This assumes that V2Authenticator::ProcessMessage runs synchronously. |
93 ASSERT_EQ(Authenticator::REJECTED, host_->state()); | 93 ASSERT_EQ(Authenticator::REJECTED, host_->state()); |
94 } | 94 } |
95 | 95 |
96 } // namespace protocol | 96 } // namespace protocol |
97 } // namespace remoting | 97 } // namespace remoting |
OLD | NEW |