| 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 "jingle/notifier/communicator/single_login_attempt.h" | 5 #include "jingle/notifier/communicator/single_login_attempt.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
| 12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
| 13 #include "base/threading/thread_task_runner_handle.h" | 13 #include "base/threading/thread_task_runner_handle.h" |
| 14 #include "jingle/notifier/base/const_communicator.h" | 14 #include "jingle/notifier/base/const_communicator.h" |
| 15 #include "jingle/notifier/base/fake_base_task.h" | 15 #include "jingle/notifier/base/fake_base_task.h" |
| 16 #include "jingle/notifier/communicator/login_settings.h" | 16 #include "jingle/notifier/communicator/login_settings.h" |
| 17 #include "net/dns/mock_host_resolver.h" | 17 #include "net/dns/mock_host_resolver.h" |
| 18 #include "net/url_request/url_request_test_util.h" | 18 #include "net/url_request/url_request_test_util.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/xmllite/xmlelement.h" |
| 21 #include "webrtc/libjingle/xmpp/constants.h" | 21 #include "third_party/xmpp/constants.h" |
| 22 #include "webrtc/libjingle/xmpp/xmppengine.h" | 22 #include "third_party/xmpp/xmppengine.h" |
| 23 | 23 |
| 24 namespace buzz { | 24 namespace buzz { |
| 25 class XmppTaskParentInterface; | 25 class XmppTaskParentInterface; |
| 26 } // namespace buzz | 26 } // namespace buzz |
| 27 | 27 |
| 28 namespace notifier { | 28 namespace notifier { |
| 29 | 29 |
| 30 namespace { | 30 namespace { |
| 31 | 31 |
| 32 enum DelegateState { | 32 enum DelegateState { |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 // Fire 'Unauthorized' errors and make sure the delegate gets the | 248 // Fire 'Unauthorized' errors and make sure the delegate gets the |
| 249 // OnCredentialsRejected() event. | 249 // OnCredentialsRejected() event. |
| 250 TEST_F(SingleLoginAttemptTest, CredentialsRejected) { | 250 TEST_F(SingleLoginAttemptTest, CredentialsRejected) { |
| 251 attempt_->OnError(buzz::XmppEngine::ERROR_UNAUTHORIZED, 0, NULL); | 251 attempt_->OnError(buzz::XmppEngine::ERROR_UNAUTHORIZED, 0, NULL); |
| 252 EXPECT_EQ(CREDENTIALS_REJECTED, fake_delegate_.state()); | 252 EXPECT_EQ(CREDENTIALS_REJECTED, fake_delegate_.state()); |
| 253 } | 253 } |
| 254 | 254 |
| 255 } // namespace | 255 } // namespace |
| 256 | 256 |
| 257 } // namespace notifier | 257 } // namespace notifier |
| OLD | NEW |