blob: f45dfdaa3ea2be405e3ac02a5a47bb241d689cf8 [file] [log] [blame]
Gary Morainac1bdb42012-02-16 17:42:29 -08001// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Darin Petkov3ec55342012-09-28 14:04:44 +02005#ifndef SHILL_MOCK_POWER_MANAGER_H_
6#define SHILL_MOCK_POWER_MANAGER_H_
Gary Morainac1bdb42012-02-16 17:42:29 -08007
Alex Vakulenko8a532292014-06-16 17:18:44 -07008#include <string>
9
Ben Chancc67c522014-09-03 07:19:18 -070010#include <base/macros.h>
Gary Morainac1bdb42012-02-16 17:42:29 -080011#include <gmock/gmock.h>
12
13#include "shill/power_manager.h"
14
15namespace shill {
16
Peter Qiu608ec292015-07-30 15:46:16 -070017class ControlInterface;
Gary Morainac1bdb42012-02-16 17:42:29 -080018
19class MockPowerManager : public PowerManager {
20 public:
Peter Qiu608ec292015-07-30 15:46:16 -070021 MockPowerManager(EventDispatcher* dispatcher,
22 ControlInterface* control_interface);
Ben Chan5ea763b2014-08-13 11:07:54 -070023 ~MockPowerManager() override;
Darin Petkov3ec55342012-09-28 14:04:44 +020024
Prathmesh Prabhu9fdb84b2014-08-21 18:41:58 -070025 MOCK_METHOD0(ReportSuspendReadiness, bool());
Samuel Tan68b73d22014-10-28 17:00:56 -070026 MOCK_METHOD0(ReportDarkSuspendReadiness, bool());
Peter Qiu77236772015-08-13 13:03:43 -070027 MOCK_METHOD4(
Prathmesh Prabhu9fdb84b2014-08-21 18:41:58 -070028 Start,
Peter Qiu77236772015-08-13 13:03:43 -070029 void(base::TimeDelta suspend_delay,
Paul Stewart1e006c62015-06-16 12:29:06 -070030 const PowerManager::SuspendImminentCallback& imminent_callback,
31 const PowerManager::SuspendDoneCallback& done_callback,
32 const PowerManager::DarkSuspendImminentCallback& dark_imminent));
Prathmesh Prabhu9fdb84b2014-08-21 18:41:58 -070033 MOCK_METHOD0(Stop, void());
Gary Morainac1bdb42012-02-16 17:42:29 -080034
35 private:
36 DISALLOW_COPY_AND_ASSIGN(MockPowerManager);
37};
38
39} // namespace shill
40
Darin Petkov3ec55342012-09-28 14:04:44 +020041#endif // SHILL_MOCK_POWER_MANAGER_H_