Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: jingle/notifier/base/xmpp_connection_unittest.cc

Issue 2738973004: Replace rtc::CryptString with std::string (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/base/xmpp_connection.h" 5 #include "jingle/notifier/base/xmpp_connection.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 12 matching lines...) Expand all
23 #include "testing/gtest/include/gtest/gtest.h" 23 #include "testing/gtest/include/gtest/gtest.h"
24 #include "third_party/libjingle_xmpp/xmpp/prexmppauth.h" 24 #include "third_party/libjingle_xmpp/xmpp/prexmppauth.h"
25 #include "third_party/libjingle_xmpp/xmpp/xmppclientsettings.h" 25 #include "third_party/libjingle_xmpp/xmpp/xmppclientsettings.h"
26 26
27 namespace buzz { 27 namespace buzz {
28 class CaptchaChallenge; 28 class CaptchaChallenge;
29 class Jid; 29 class Jid;
30 } // namespace buzz 30 } // namespace buzz
31 31
32 namespace rtc { 32 namespace rtc {
33 class CryptString;
34 class SocketAddress; 33 class SocketAddress;
35 class Task; 34 class Task;
36 } // namespace rtc 35 } // namespace rtc
37 36
38 namespace notifier { 37 namespace notifier {
39 38
40 using ::testing::_; 39 using ::testing::_;
41 using ::testing::Return; 40 using ::testing::Return;
42 using ::testing::SaveArg; 41 using ::testing::SaveArg;
43 42
44 class MockPreXmppAuth : public buzz::PreXmppAuth { 43 class MockPreXmppAuth : public buzz::PreXmppAuth {
45 public: 44 public:
46 virtual ~MockPreXmppAuth() {} 45 virtual ~MockPreXmppAuth() {}
47 46
48 MOCK_METHOD2(ChooseBestSaslMechanism, 47 MOCK_METHOD2(ChooseBestSaslMechanism,
49 std::string(const std::vector<std::string>&, bool)); 48 std::string(const std::vector<std::string>&, bool));
50 MOCK_METHOD1(CreateSaslMechanism, 49 MOCK_METHOD1(CreateSaslMechanism,
51 buzz::SaslMechanism*(const std::string&)); 50 buzz::SaslMechanism*(const std::string&));
52 MOCK_METHOD5(StartPreXmppAuth, 51 MOCK_METHOD5(StartPreXmppAuth,
53 void(const buzz::Jid&, 52 void(const buzz::Jid&,
54 const rtc::SocketAddress&, 53 const rtc::SocketAddress&,
55 const rtc::CryptString&, 54 const std::string&,
56 const std::string&, 55 const std::string&,
57 const std::string&)); 56 const std::string&));
58 MOCK_CONST_METHOD0(IsAuthDone, bool()); 57 MOCK_CONST_METHOD0(IsAuthDone, bool());
59 MOCK_CONST_METHOD0(IsAuthorized, bool()); 58 MOCK_CONST_METHOD0(IsAuthorized, bool());
60 MOCK_CONST_METHOD0(HadError, bool()); 59 MOCK_CONST_METHOD0(HadError, bool());
61 MOCK_CONST_METHOD0(GetError, int()); 60 MOCK_CONST_METHOD0(GetError, int());
62 MOCK_CONST_METHOD0(GetCaptchaChallenge, buzz::CaptchaChallenge()); 61 MOCK_CONST_METHOD0(GetCaptchaChallenge, buzz::CaptchaChallenge());
63 MOCK_CONST_METHOD0(GetAuthToken, std::string()); 62 MOCK_CONST_METHOD0(GetAuthToken, std::string());
64 MOCK_CONST_METHOD0(GetAuthMechanism, std::string()); 63 MOCK_CONST_METHOD0(GetAuthMechanism, std::string());
65 }; 64 };
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 .WillByDefault(Return(TASK_STATE_ERROR)); 249 .WillByDefault(Return(TASK_STATE_ERROR));
251 EXPECT_CALL(*task, ProcessStart()).Times(0); 250 EXPECT_CALL(*task, ProcessStart()).Times(0);
252 task->Start(); 251 task->Start();
253 } 252 }
254 253
255 // This should destroy |task_pump|, but |task| still shouldn't run. 254 // This should destroy |task_pump|, but |task| still shouldn't run.
256 base::RunLoop().RunUntilIdle(); 255 base::RunLoop().RunUntilIdle();
257 } 256 }
258 257
259 } // namespace notifier 258 } // namespace notifier
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698