~ci-train-bot/qtmir/qtmir-ubuntu-zesty-2668

« back to all changes in this revision

Viewing changes to tests/framework/fake_surface.h

  • Committer: Bileto Bot
  • Author(s): Alan Griffiths
  • Date: 2017-03-28 17:13:24 UTC
  • mfrom: (625.3.3 qtmir)
  • Revision ID: ci-train-bot@canonical.com-20170328171324-zb2zo37unynmzu23
Compatibility with lp:mir and lp:~alan-griffiths/miral/1.3

Approved by: Gerry Boland, Unity8 CI Bot

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
#include <mir/scene/surface.h>
23
23
#include <mir/version.h>
24
 
#include "stub_input_channel.h"
25
 
 
26
24
#include <memory>
27
25
#include <gmock/gmock.h>
28
26
 
32
30
class FakeSurface : public Surface
33
31
{
34
32
public:
35
 
    std::shared_ptr<mir::test::doubles::StubInputChannel> channel;
36
33
    int fd;
37
34
    mir::input::InputReceptionMode input_mode{mir::input::InputReceptionMode::normal};
38
35
 
39
36
    FakeSurface(int fd=123)
40
 
        : channel(std::make_shared<mir::test::doubles::StubInputChannel>(fd)), fd(fd)
 
37
        : fd(fd)
41
38
    {
42
39
    }
43
40
 
44
41
    std::shared_ptr<mir::input::InputChannel> input_channel() const override
45
42
    {
46
 
        return channel;
 
43
        return {};
47
44
    }
48
45
 
49
46
    mir::input::InputReceptionMode reception_mode() const override