~unity-system-compositor-team/unity-system-compositor/trunk

« back to all changes in this revision

Viewing changes to tests/unit-tests/test_screen_event_handler.cpp

  • Committer: Tarmac
  • Author(s): Alexandros Frantzis
  • Date: 2015-04-28 06:59:14 UTC
  • mfrom: (203.2.7 powerd-mediator)
  • Revision ID: tarmac-20150428065914-y1hs68oib8m0nzpy
Reimplement PowerdMediator without Qt. Fixes: https://bugs.launchpad.net/bugs/1389187.

Approved by Alberto Aguirre, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include "src/screen.h"
22
22
 
23
23
#include "advanceable_timer.h"
 
24
#include "fake_shared.h"
24
25
 
25
26
#include <mir/events/event_builders.h>
26
27
 
91
92
    testing::NiceMock<MockScreen> mock_screen;
92
93
    std::atomic<bool> shutdown_called{false};
93
94
    usc::ScreenEventHandler screen_event_handler{
94
 
        timer,
 
95
        usc::test::fake_shared(mock_screen),
 
96
        usc::test::fake_shared(timer),
95
97
        power_key_ignore_timeout,
96
98
        shutdown_timeout,
97
 
        [&] { shutdown_called = true; },
98
 
        mock_screen};
 
99
        [&] { shutdown_called = true; }};
99
100
};
100
101
 
101
102
}