blob: a35a187d314e86efdd00f6d8c49cee53071e5790 [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
Gary Morainac1bdb42012-02-16 17:42:29 -080010#include <base/basictypes.h>
11#include <gmock/gmock.h>
12
13#include "shill/power_manager.h"
14
15namespace shill {
16
17class ProxyFactory;
18
19class MockPowerManager : public PowerManager {
20 public:
Darin Petkov3ec55342012-09-28 14:04:44 +020021 MockPowerManager(EventDispatcher *dispatcher, ProxyFactory *proxy_factory);
Gary Morainac1bdb42012-02-16 17:42:29 -080022 virtual ~MockPowerManager();
Darin Petkov3ec55342012-09-28 14:04:44 +020023
Daniel Eratfac09532014-04-17 20:25:59 -070024 MOCK_METHOD5(AddSuspendDelay,
25 bool(const std::string &key,
Daniel Eratf9753672013-01-24 10:17:02 -080026 const std::string &description,
Daniel Eratfac09532014-04-17 20:25:59 -070027 base::TimeDelta timeout,
28 const SuspendImminentCallback &immiment_callback,
29 const SuspendDoneCallback &done_callback));
30 MOCK_METHOD1(RemoveSuspendDelay, bool(const std::string &key));
31 MOCK_METHOD2(ReportSuspendReadiness,
32 bool(const std::string &key, int suspend_id));
Gary Morainac1bdb42012-02-16 17:42:29 -080033
34 private:
35 DISALLOW_COPY_AND_ASSIGN(MockPowerManager);
36};
37
38} // namespace shill
39
Darin Petkov3ec55342012-09-28 14:04:44 +020040#endif // SHILL_MOCK_POWER_MANAGER_H_