1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/memory/scoped_ptr.h"
6 #include "remoting/signaling/iq_sender.h"
7 #include "remoting/signaling/signal_strategy.h"
8 #include "testing/gmock/include/gmock/gmock.h"
9 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h"
13 class MockSignalStrategy
: public SignalStrategy
{
16 virtual ~MockSignalStrategy();
18 MOCK_METHOD0(Connect
, void());
19 MOCK_METHOD0(Disconnect
, void());
20 MOCK_CONST_METHOD0(GetState
, State());
21 MOCK_CONST_METHOD0(GetError
, Error());
22 MOCK_CONST_METHOD0(GetLocalJid
, std::string());
23 MOCK_METHOD1(AddListener
, void(Listener
* listener
));
24 MOCK_METHOD1(RemoveListener
, void(Listener
* listener
));
25 MOCK_METHOD0(GetNextId
, std::string());
27 // GMock currently doesn't support move-only arguments, so we have
28 // to use this hack here.
29 MOCK_METHOD1(SendStanzaPtr
, bool(buzz::XmlElement
* stanza
));
30 virtual bool SendStanza(scoped_ptr
<buzz::XmlElement
> stanza
) override
{
31 return SendStanzaPtr(stanza
.release());
35 } // namespace remoting