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 <memory> | 5 #include <memory> |
6 #include <string> | 6 #include <string> |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/ptr_util.h" | 12 #include "base/memory/ptr_util.h" |
13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
14 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
15 #include "remoting/protocol/authenticator.h" | 15 #include "remoting/protocol/authenticator.h" |
16 #include "remoting/protocol/protocol_mock_objects.h" | 16 #include "remoting/protocol/protocol_mock_objects.h" |
17 #include "remoting/protocol/validating_authenticator.h" | 17 #include "remoting/protocol/validating_authenticator.h" |
18 #include "testing/gmock/include/gmock/gmock.h" | 18 #include "testing/gmock/include/gmock/gmock.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" | 20 #include "third_party/libjingle_xmpp/xmllite/xmlelement.h" |
21 | 21 |
22 namespace remoting { | 22 namespace remoting { |
23 namespace protocol { | 23 namespace protocol { |
24 | 24 |
25 namespace { | 25 namespace { |
26 | 26 |
27 using testing::_; | 27 using testing::_; |
28 using testing::Return; | 28 using testing::Return; |
29 | 29 |
30 typedef ValidatingAuthenticator::Result ValidationResult; | 30 typedef ValidatingAuthenticator::Result ValidationResult; |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 | 260 |
261 SendMessageAndWaitForCallback(); | 261 SendMessageAndWaitForCallback(); |
262 ASSERT_TRUE(validate_complete_called_); | 262 ASSERT_TRUE(validate_complete_called_); |
263 ASSERT_EQ(validating_authenticator_->state(), Authenticator::REJECTED); | 263 ASSERT_EQ(validating_authenticator_->state(), Authenticator::REJECTED); |
264 ASSERT_EQ(validating_authenticator_->rejection_reason(), | 264 ASSERT_EQ(validating_authenticator_->rejection_reason(), |
265 Authenticator::PROTOCOL_ERROR); | 265 Authenticator::PROTOCOL_ERROR); |
266 } | 266 } |
267 | 267 |
268 } // namespace protocol | 268 } // namespace protocol |
269 } // namespace remoting | 269 } // namespace remoting |
OLD | NEW |