~ubuntu-branches/ubuntu/utopic/mir/utopic-proposed

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release
  • Date: 2014-03-10 19:28:46 UTC
  • mto: This revision was merged to the branch mainline in revision 63.
  • Revision ID: package-import@ubuntu.com-20140310192846-rq9qm3ec26yrelo2
Tags: upstream-0.1.6+14.04.20140310
ImportĀ upstreamĀ versionĀ 0.1.6+14.04.20140310

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#include "src/server/frontend/session_mediator.h"
21
21
#include "src/server/frontend/resource_cache.h"
22
22
#include "src/server/scene/application_session.h"
 
23
#include "src/server/frontend/session_mediator.h"
 
24
#include "src/server/report/null_report_factory.h"
23
25
#include "mir/frontend/shell.h"
24
26
#include "mir/graphics/display.h"
25
27
#include "mir/graphics/drm_authenticator.h"
45
47
namespace mp = mir::protobuf;
46
48
namespace msh = mir::shell;
47
49
namespace mtd = mir::test::doubles;
 
50
namespace mr = mir::report;
48
51
 
49
52
namespace
50
53
{
58
61
        return std::shared_ptr<mg::GraphicBufferAllocator>();
59
62
    }
60
63
 
61
 
    MOCK_METHOD1(drm_auth_magic, void(drm_magic_t));
 
64
    MOCK_METHOD1(drm_auth_magic, void(unsigned int));
62
65
};
63
66
 
64
67
struct SessionMediatorMesaTest : public ::testing::Test
68
71
          mock_platform{std::make_shared<MockAuthenticatingPlatform>()},
69
72
          display_changer{std::make_shared<mtd::NullDisplayChanger>()},
70
73
          surface_pixel_formats{mir_pixel_format_argb_8888, mir_pixel_format_xrgb_8888},
71
 
          report{std::make_shared<mf::NullSessionMediatorReport>()},
 
74
          report{mr::null_session_mediator_report()},
72
75
          resource_cache{std::make_shared<mf::ResourceCache>()},
73
76
          mediator{__LINE__, shell, mock_platform, display_changer,
74
77
                   surface_pixel_formats, report,
96
99
    mp::ConnectParameters connect_parameters;
97
100
    mp::Connection connection;
98
101
 
99
 
    drm_magic_t const drm_magic{0x10111213};
 
102
    unsigned int const drm_magic{0x10111213};
100
103
    int const no_error{0};
101
104
 
102
105
    EXPECT_CALL(*mock_platform, drm_auth_magic(drm_magic))
120
123
    mp::ConnectParameters connect_parameters;
121
124
    mp::Connection connection;
122
125
 
123
 
    drm_magic_t const drm_magic{0x10111213};
 
126
    unsigned int const drm_magic{0x10111213};
124
127
    int const error_number{667};
125
128
 
126
129
    EXPECT_CALL(*mock_platform, drm_auth_magic(drm_magic))