blob: e6126f8812324377bbacc285c8c1bf69add76b28 [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
17class ProxyFactory;
18
19class MockPowerManager : public PowerManager {
20 public:
Paul Stewart1e006c62015-06-16 12:29:06 -070021 MockPowerManager(EventDispatcher* dispatcher, ProxyFactory* proxy_factory);
Ben Chan5ea763b2014-08-13 11:07:54 -070022 ~MockPowerManager() override;
Darin Petkov3ec55342012-09-28 14:04:44 +020023
Prathmesh Prabhu9fdb84b2014-08-21 18:41:58 -070024 MOCK_METHOD0(ReportSuspendReadiness, bool());
Samuel Tan68b73d22014-10-28 17:00:56 -070025 MOCK_METHOD0(ReportDarkSuspendReadiness, bool());
Prathmesh Prabhu64ad2382014-08-26 11:19:30 -070026 MOCK_METHOD5(
Prathmesh Prabhu9fdb84b2014-08-21 18:41:58 -070027 Start,
Paul Stewart1e006c62015-06-16 12:29:06 -070028 void(DBusManager* dbus_manager,
Prathmesh Prabhu9fdb84b2014-08-21 18:41:58 -070029 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_