~mir-team/mir/trunk

« back to all changes in this revision

Viewing changes to tests/unit-tests/shell/test_registration_order_focus_sequence.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:
33
33
#include <string>
34
34
 
35
35
namespace mc = mir::compositor;
 
36
namespace me = mir::events;
36
37
namespace msh = mir::shell;
37
38
namespace ms = mir::surfaces;
38
39
namespace mt = mir::test;
65
66
{
66
67
    using namespace ::testing;
67
68
 
68
 
    auto app1 = std::make_shared<msh::ApplicationSession>(factory, mt::fake_shared(input_listener), testing_app_name1);
69
 
    auto app2 = std::make_shared<msh::ApplicationSession>(factory, mt::fake_shared(input_listener), testing_app_name2);
70
 
    auto app3 = std::make_shared<msh::ApplicationSession>(factory, mt::fake_shared(input_listener), testing_app_name3);
 
69
    auto app1 = std::make_shared<msh::ApplicationSession>(factory, mt::fake_shared(input_listener), testing_app_name1, std::shared_ptr<me::EventSink>());
 
70
    auto app2 = std::make_shared<msh::ApplicationSession>(factory, mt::fake_shared(input_listener), testing_app_name2, std::shared_ptr<me::EventSink>());
 
71
    auto app3 = std::make_shared<msh::ApplicationSession>(factory, mt::fake_shared(input_listener), testing_app_name3, std::shared_ptr<me::EventSink>());
71
72
 
72
73
    container->insert_session(app1);
73
74
    container->insert_session(app2);
83
84
{
84
85
    using namespace ::testing;
85
86
 
86
 
    auto app1 = std::make_shared<msh::ApplicationSession>(factory, mt::fake_shared(input_listener), testing_app_name1);
87
 
    auto app2 = std::make_shared<msh::ApplicationSession>(factory, mt::fake_shared(input_listener), testing_app_name2);
88
 
    auto app3 = std::make_shared<msh::ApplicationSession>(factory, mt::fake_shared(input_listener), testing_app_name3);
 
87
    auto app1 = std::make_shared<msh::ApplicationSession>(factory, mt::fake_shared(input_listener), testing_app_name1, std::shared_ptr<me::EventSink>());
 
88
    auto app2 = std::make_shared<msh::ApplicationSession>(factory, mt::fake_shared(input_listener), testing_app_name2, std::shared_ptr<me::EventSink>());
 
89
    auto app3 = std::make_shared<msh::ApplicationSession>(factory, mt::fake_shared(input_listener), testing_app_name3, std::shared_ptr<me::EventSink>());
89
90
    container->insert_session(app1);
90
91
    container->insert_session(app2);
91
92
    container->insert_session(app3);
100
101
{
101
102
    using namespace ::testing;
102
103
 
103
 
    auto app1 = std::make_shared<msh::ApplicationSession>(factory, mt::fake_shared(input_listener), testing_app_name1);
 
104
    auto app1 = std::make_shared<msh::ApplicationSession>(factory, mt::fake_shared(input_listener), testing_app_name1, std::shared_ptr<me::EventSink>());
104
105
    container->insert_session(app1);
105
106
 
106
107
    msh::RegistrationOrderFocusSequence focus_sequence(container);
112
113
{
113
114
    using namespace ::testing;
114
115
 
115
 
    auto app1 = std::make_shared<msh::ApplicationSession>(factory, mt::fake_shared(input_listener), testing_app_name1);
116
 
    auto app2 = std::make_shared<msh::ApplicationSession>(factory, mt::fake_shared(input_listener), testing_app_name2);
 
116
    auto app1 = std::make_shared<msh::ApplicationSession>(factory, mt::fake_shared(input_listener), testing_app_name1, std::shared_ptr<me::EventSink>());
 
117
    auto app2 = std::make_shared<msh::ApplicationSession>(factory, mt::fake_shared(input_listener), testing_app_name2, std::shared_ptr<me::EventSink>());
117
118
    auto null_session = std::shared_ptr<msh::ApplicationSession>();
118
119
 
119
120
    msh::RegistrationOrderFocusSequence focus_sequence(container);
129
130
{
130
131
    using namespace ::testing;
131
132
 
132
 
    auto invalid_session = std::make_shared<msh::ApplicationSession>(factory, mt::fake_shared(input_listener), testing_app_name1);
 
133
    auto invalid_session = std::make_shared<msh::ApplicationSession>(factory, mt::fake_shared(input_listener), testing_app_name1, std::shared_ptr<me::EventSink>());
133
134
    auto null_session = std::shared_ptr<msh::ApplicationSession>();
134
135
 
135
136
    msh::RegistrationOrderFocusSequence focus_sequence(container);