~mir-team/mir/trunk

« back to all changes in this revision

Viewing changes to tests/unit-tests/frontend/test_session_mediator_gbm.cpp

  • Committer: Tarmac
  • Author(s): Alan Griffiths
  • Date: 2013-04-25 23:50:01 UTC
  • mfrom: (526.2.22 mir1)
  • Revision ID: tarmac-20130425235001-c3b3x2yyb3eldyx1
frontend, shell, tests: surface-states updated to avoid supplying dependencies through public member functions.

Approved by PS Jenkins bot, Chris Halse Rogers, Robert Ancell, Kevin DuBois.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#include "mir/graphics/drm_authenticator.h"
28
28
#include "mir/graphics/platform.h"
29
29
#include "mir/graphics/platform_ipc_package.h"
30
 
#include "mir/event_queue.h"
 
30
#include "mir/events/event_sink.h"
31
31
 
32
32
#include <boost/exception/errinfo_errno.hpp>
33
33
#include <boost/throw_exception.hpp>
91
91
    MOCK_METHOD1(drm_auth_magic, void(drm_magic_t));
92
92
};
93
93
 
94
 
}
 
94
class NullEventSink : public mir::events::EventSink
 
95
{
 
96
public:
 
97
    void handle_event(MirEvent const& ) override {}
 
98
};
95
99
 
96
100
struct SessionMediatorGBMTest : public ::testing::Test
97
101
{
104
108
          resource_cache{std::make_shared<mf::ResourceCache>()},
105
109
          mediator{shell, mock_platform, graphics_display,
106
110
                   buffer_allocator, report,
107
 
                   std::make_shared<mir::EventQueue>(),
 
111
                   std::make_shared<NullEventSink>(),
108
112
                   resource_cache},
109
113
          null_callback{google::protobuf::NewPermanentCallback(google::protobuf::DoNothing)}
110
114
    {
121
125
    std::unique_ptr<google::protobuf::Closure> null_callback;
122
126
};
123
127
 
 
128
}
 
129
 
124
130
TEST_F(SessionMediatorGBMTest, drm_auth_magic_uses_drm_authenticator)
125
131
{
126
132
    mp::ConnectParameters connect_parameters;