~mterry/qtmir/warn-on-xapp

« back to all changes in this revision

Viewing changes to tests/modules/common/mock_process_controller.h

  • Committer: Gerry Boland
  • Date: 2014-07-01 13:38:06 UTC
  • mto: This revision was merged to the branch mainline in revision 158.
  • Revision ID: gerry.boland@canonical.com-20140701133806-lwfnplkijthydzj4
Update QML plugin: rename to Unity.Application, merge latest unity-mir changes, add tests (not passing yet) and use category logging

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2013 Canonical, Ltd.
 
3
 *
 
4
 * This program is free software: you can redistribute it and/or modify it under
 
5
 * the terms of the GNU Lesser General Public License version 3, as published by
 
6
 * the Free Software Foundation.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful, but WITHOUT
 
9
 * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
 
10
 * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
11
 * Lesser General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU Lesser General Public License
 
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 *
 
16
 */
 
17
#ifndef MOCK_PROCESS_CONTROLLER_H
 
18
#define MOCK_PROCESS_CONTROLLER_H
 
19
 
 
20
#include <Unity/Application/processcontroller.h>
 
21
 
 
22
#include <gmock/gmock.h>
 
23
 
 
24
namespace testing
 
25
{
 
26
struct MockProcessController : public qtmir::ProcessController
 
27
{
 
28
    MockProcessController(const QSharedPointer<qtmir::ProcessController::OomController>& oomController)
 
29
        : m_oomController(oomController)
 
30
    {
 
31
    }
 
32
 
 
33
    const QSharedPointer<qtmir::ProcessController::OomController>& oomController() const
 
34
    {
 
35
        return m_oomController;
 
36
    }
 
37
 
 
38
    MOCK_CONST_METHOD1(sigStopProcessGroupForPid, bool(pid_t));
 
39
    MOCK_CONST_METHOD1(sigContinueProcessGroupForPid, bool(pid_t));
 
40
 
 
41
    QSharedPointer<qtmir::ProcessController::OomController> m_oomController;
 
42
};
 
43
}
 
44
 
 
45
#endif // MOCK_PROCESS_CONTROLLER_H