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

Side by Side Diff: remoting/jingle_glue/mock_objects.h

Issue 10378110: Verify that xmpp_login specified in the config matches auth token. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 7 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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "remoting/jingle_glue/iq_sender.h" 6 #include "remoting/jingle_glue/iq_sender.h"
7 #include "remoting/jingle_glue/signal_strategy.h" 7 #include "remoting/jingle_glue/signal_strategy.h"
8 #include "testing/gmock/include/gmock/gmock.h" 8 #include "testing/gmock/include/gmock/gmock.h"
9 #include "third_party/libjingle/source/talk/xmllite/xmlelement.h" 9 #include "third_party/libjingle/source/talk/xmllite/xmlelement.h"
10 10
11 namespace remoting { 11 namespace remoting {
12 12
13 class MockSignalStrategy : public SignalStrategy { 13 class MockSignalStrategy : public SignalStrategy {
14 public: 14 public:
15 MockSignalStrategy(); 15 MockSignalStrategy();
16 virtual ~MockSignalStrategy(); 16 virtual ~MockSignalStrategy();
17 17
18 MOCK_METHOD0(Connect, void()); 18 MOCK_METHOD0(Connect, void());
19 MOCK_METHOD0(Disconnect, void()); 19 MOCK_METHOD0(Disconnect, void());
20 MOCK_CONST_METHOD0(GetState, State()); 20 MOCK_CONST_METHOD0(GetState, State());
21 MOCK_CONST_METHOD0(GetError, Error());
21 MOCK_CONST_METHOD0(GetLocalJid, std::string()); 22 MOCK_CONST_METHOD0(GetLocalJid, std::string());
22 MOCK_METHOD1(AddListener, void(Listener* listener)); 23 MOCK_METHOD1(AddListener, void(Listener* listener));
23 MOCK_METHOD1(RemoveListener, void(Listener* listener)); 24 MOCK_METHOD1(RemoveListener, void(Listener* listener));
24 MOCK_METHOD0(GetNextId, std::string()); 25 MOCK_METHOD0(GetNextId, std::string());
25 26
26 // GMock currently doesn't support move-only arguments, so we have 27 // GMock currently doesn't support move-only arguments, so we have
27 // to use this hack here. 28 // to use this hack here.
28 MOCK_METHOD1(SendStanzaPtr, bool(buzz::XmlElement* stanza)); 29 MOCK_METHOD1(SendStanzaPtr, bool(buzz::XmlElement* stanza));
29 virtual bool SendStanza(scoped_ptr<buzz::XmlElement> stanza) OVERRIDE { 30 virtual bool SendStanza(scoped_ptr<buzz::XmlElement> stanza) OVERRIDE {
30 return SendStanzaPtr(stanza.release()); 31 return SendStanzaPtr(stanza.release());
31 } 32 }
32 }; 33 };
33 34
34 } // namespace remoting 35 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/jingle_glue/javascript_signal_strategy.cc ('k') | remoting/jingle_glue/signal_strategy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698