~mir-team/mir/trunk

« back to all changes in this revision

Viewing changes to tests/acceptance-tests/test_focus_management_api.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:
126
126
    {
127
127
        using namespace ::testing;
128
128
        using frontend::Shell;
129
 
        ON_CALL(*this, open_session(_)).WillByDefault(Invoke(impl.get(), &Shell::open_session));
 
129
        ON_CALL(*this, open_session(_, _)).WillByDefault(Invoke(impl.get(), &Shell::open_session));
130
130
        ON_CALL(*this, close_session(_)).WillByDefault(Invoke(impl.get(), &Shell::close_session));
131
131
 
132
132
        ON_CALL(*this, tag_session_with_lightdm_id(_, _)).WillByDefault(Invoke(impl.get(), &Shell::tag_session_with_lightdm_id));
135
135
        ON_CALL(*this, create_surface_for(_, _)).WillByDefault(Invoke(impl.get(), &Shell::create_surface_for));
136
136
    }
137
137
 
138
 
    MOCK_METHOD1(open_session, std::shared_ptr<mf::Session> (std::string const& name));
 
138
    MOCK_METHOD2(open_session, std::shared_ptr<mf::Session> (std::string const& name, std::shared_ptr<mir::events::EventSink> const&));
139
139
    MOCK_METHOD1(close_session, void (std::shared_ptr<mf::Session> const& session));
140
140
 
141
141
    MOCK_METHOD2(tag_session_with_lightdm_id, void (std::shared_ptr<mf::Session> const& session, int id));
167
167
 
168
168
                    Sequence s1, s2;
169
169
 
170
 
                    EXPECT_CALL(*mock_shell, open_session(_))
 
170
                    EXPECT_CALL(*mock_shell, open_session(_, _))
171
171
                        .InSequence(s1, s2);
172
172
 
173
173
                    EXPECT_CALL(*mock_shell, create_surface_for(_,_))
174
174
                        .InSequence(s1);
175
175
 
176
 
                    EXPECT_CALL(*mock_shell, open_session(_))
 
176
                    EXPECT_CALL(*mock_shell, open_session(_, _))
177
177
                        .InSequence(s2);
178
178
 
179
179
                    EXPECT_CALL(*mock_shell, close_session(_))