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/protocol/spake2_authenticator.h" | 5 #include "remoting/protocol/spake2_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 "remoting/base/rsa_key_pair.h" | 10 #include "remoting/base/rsa_key_pair.h" |
11 #include "remoting/protocol/authenticator_test_base.h" | 11 #include "remoting/protocol/authenticator_test_base.h" |
12 #include "remoting/protocol/channel_authenticator.h" | 12 #include "remoting/protocol/channel_authenticator.h" |
13 #include "remoting/protocol/connection_tester.h" | 13 #include "remoting/protocol/connection_tester.h" |
14 #include "testing/gmock/include/gmock/gmock.h" | 14 #include "testing/gmock/include/gmock/gmock.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" | 16 #include "third_party/libjingle_xmpp/xmllite/xmlelement.h" |
17 | 17 |
18 using testing::_; | 18 using testing::_; |
19 using testing::DeleteArg; | 19 using testing::DeleteArg; |
20 using testing::SaveArg; | 20 using testing::SaveArg; |
21 | 21 |
22 namespace remoting { | 22 namespace remoting { |
23 namespace protocol { | 23 namespace protocol { |
24 | 24 |
25 namespace { | 25 namespace { |
26 | 26 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 ASSERT_TRUE(message.get()); | 90 ASSERT_TRUE(message.get()); |
91 | 91 |
92 ASSERT_EQ(Authenticator::WAITING_MESSAGE, client_->state()); | 92 ASSERT_EQ(Authenticator::WAITING_MESSAGE, client_->state()); |
93 host_->ProcessMessage(message.get(), base::Bind(&base::DoNothing)); | 93 host_->ProcessMessage(message.get(), base::Bind(&base::DoNothing)); |
94 // This assumes that Spake2Authenticator::ProcessMessage runs synchronously. | 94 // This assumes that Spake2Authenticator::ProcessMessage runs synchronously. |
95 ASSERT_EQ(Authenticator::REJECTED, host_->state()); | 95 ASSERT_EQ(Authenticator::REJECTED, host_->state()); |
96 } | 96 } |
97 | 97 |
98 } // namespace protocol | 98 } // namespace protocol |
99 } // namespace remoting | 99 } // namespace remoting |
OLD | NEW |