~alan-griffiths/miral/WindowControllerInterface-isVisible

« back to all changes in this revision

Viewing changes to miral-qt/tests/modules/WindowManager/windowmodel_test.cpp

  • Committer: Alan Griffiths
  • Date: 2016-11-04 15:53:36 UTC
  • Revision ID: alan@octopull.co.uk-20161104155336-6ipjgmzib46scmgp
Use StubWindowModelController in tests where nullptr won't do

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include "Unity/Application/mirsurface.h"
26
26
#include "Unity/Application/windowmodel.h"
27
27
 
 
28
#include "stub_windowcontroller.h"
28
29
#include <mir/test/doubles/stub_surface.h>
29
30
#include <mir/test/doubles/stub_session.h>
30
31
 
123
124
    const std::shared_ptr<StubSession> stubSession{std::make_shared<StubSession>()};
124
125
    const std::shared_ptr<SizedStubSurface> stubSurface{std::make_shared<SizedStubSurface>()};
125
126
    QCoreApplication *qtApp;
 
127
 
 
128
    StubWindowModelController controller;
126
129
};
127
130
 
128
131
/*
688
691
TEST_F(WindowModelTest, WindowReadyCausesMirSurfaceToEmitReadySignal)
689
692
{
690
693
    WindowModelNotifier notifier;
691
 
    WindowModel model(&notifier, nullptr); // no need for controller in this testcase
 
694
    WindowModel model(&notifier, &controller);
692
695
 
693
696
    auto newWindow = createNewWindow();
694
697
    notifier.windowAdded(newWindow);
745
748
    auto const& param = GetParam();
746
749
 
747
750
    WindowModelNotifier notifier;
748
 
    WindowModel model(&notifier, nullptr); // no need for controller in this testcase
 
751
    WindowModel model(&notifier, &controller);
749
752
 
750
753
    auto newWindow = createNewWindowWithState(Mir::UnknownState);
751
754
    notifier.windowAdded(newWindow);
766
769
    auto const& param = GetParam();
767
770
 
768
771
    WindowModelNotifier notifier;
769
 
    WindowModel model(&notifier, nullptr); // no need for controller in this testcase
 
772
    WindowModel model(&notifier, &controller);
770
773
 
771
774
    auto newWindow = createNewWindowWithState(Mir::UnknownState);
772
775
    notifier.windowAdded(newWindow);