~ubuntu-branches/ubuntu/vivid/mir/vivid

« back to all changes in this revision

Viewing changes to tests/unit-tests/scene/test_session_manager.cpp

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release
  • Date: 2014-01-08 02:04:38 UTC
  • mto: This revision was merged to the branch mainline in revision 58.
  • Revision ID: package-import@ubuntu.com-20140108020438-e1npu0pm7qdv5wc4
Tags: upstream-0.1.3+14.04.20140108
ImportĀ upstreamĀ versionĀ 0.1.3+14.04.20140108

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#include "mir_test_doubles/mock_focus_setter.h"
34
34
#include "mir_test_doubles/mock_session_listener.h"
35
35
#include "mir_test_doubles/stub_surface_builder.h"
36
 
#include "mir_test_doubles/stub_surface_controller.h"
 
36
#include "mir_test_doubles/stub_surface_ranker.h"
37
37
#include "mir_test_doubles/null_snapshot_strategy.h"
38
38
#include "mir_test_doubles/null_surface_configurator.h"
39
39
#include "mir_test_doubles/null_session_event_sink.h"
84
84
    }
85
85
 
86
86
    mtd::StubSurfaceBuilder surface_builder;
87
 
    mtd::StubSurfaceController surface_controller;
 
87
    mtd::StubSurfaceRanker surface_ranker;
88
88
    mtd::MockSurfaceFactory surface_factory;
89
89
    testing::NiceMock<MockSessionContainer> container;    // Inelegant but some tests need a stub
90
90
    testing::NiceMock<mtd::MockFocusSetter> focus_setter; // Inelegant but some tests need a stub
116
116
 
117
117
    ON_CALL(surface_factory, create_surface(_, _, _, _)).WillByDefault(
118
118
       Return(std::make_shared<ms::SurfaceImpl>(
119
 
           nullptr,
120
119
           mt::fake_shared(surface_builder), std::make_shared<mtd::NullSurfaceConfigurator>(),
121
120
           msh::a_surface(),mf::SurfaceId{}, std::shared_ptr<mf::EventSink>())));
122
121
 
150
149
    using namespace ::testing;
151
150
    ON_CALL(surface_factory, create_surface(_, _, _, _)).WillByDefault(
152
151
        Return(std::make_shared<ms::SurfaceImpl>(
153
 
           nullptr,
154
152
           mt::fake_shared(surface_builder), std::make_shared<mtd::NullSurfaceConfigurator>(),
155
153
           msh::a_surface(),mf::SurfaceId{}, std::shared_ptr<mf::EventSink>())));
156
154
 
167
165
    session_manager.create_surface_for(session1, msh::a_surface());
168
166
}
169
167
 
170
 
namespace 
 
168
namespace
171
169
{
172
170
 
173
171
struct SessionManagerSessionListenerSetup : public testing::Test