blob: ef29191a235b1af4a003c53a0fd2a462ec15a3ad [file] [log] [blame]
Bruno Rochabe388f32011-08-02 12:40:17 -07001// Copyright (c) 2011 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
5#ifndef METRICS_TIMER_MOCK_H_
6#define METRICS_TIMER_MOCK_H_
7
8
9#include <string>
10
11#include <base/basictypes.h>
12#include <base/time.h>
13#include <gmock/gmock.h>
14
15#include "timer.h"
16
17namespace chromeos_metrics {
18
19class TimerMock : public Timer {
20 public:
21 MOCK_METHOD0(Start, bool());
22 MOCK_METHOD0(Stop, bool());
23 MOCK_METHOD0(Reset, bool());
24 MOCK_CONST_METHOD0(HasStarted, bool());
25 MOCK_CONST_METHOD1(GetElapsedTime, bool(base::TimeDelta* elapsed_time));
26};
27
28class TimerReporterMock : public TimerReporter {
29 public:
30 MOCK_METHOD0(Start, bool());
31 MOCK_METHOD0(Stop, bool());
32 MOCK_METHOD0(Reset, bool());
33 MOCK_CONST_METHOD0(HasStarted, bool());
34 MOCK_CONST_METHOD0(GetElapsedTime, base::TimeDelta());
35 MOCK_CONST_METHOD0(ReportMilliseconds, bool());
36};
37
38class ClockWrapperMock : public ClockWrapper {
39 public:
40 MOCK_CONST_METHOD0(GetCurrentTime, base::TimeTicks());
41};
42
43} // namespace chromeos_metrics
44
45#endif // METRICS_TIMER_MOCK_H_