OLD | NEW |
| (Empty) |
1 // 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 CHROMEOS_PROCESS_MOCK_H_ | |
6 #define CHROMEOS_PROCESS_MOCK_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include <chromeos/process.h> | |
11 #include <gmock/gmock.h> | |
12 | |
13 namespace chromeos { | |
14 | |
15 class ProcessMock : public Process { | |
16 public: | |
17 ProcessMock() {} | |
18 virtual ~ProcessMock() {} | |
19 | |
20 MOCK_METHOD1(AddArg, void(const std::string& arg)); | |
21 MOCK_METHOD1(RedirectOutput, void(const std::string& output_file)); | |
22 MOCK_METHOD0(Start, bool()); | |
23 MOCK_METHOD0(Wait, int()); | |
24 MOCK_METHOD0(Run, int()); | |
25 MOCK_METHOD0(pid, pid_t()); | |
26 MOCK_METHOD2(Kill, bool(int signal, int timeout)); | |
27 MOCK_METHOD1(Reset, void(pid_t)); | |
28 MOCK_METHOD1(ResetPidByFile, bool(const std::string& pid_file)); | |
29 MOCK_METHOD0(Release, pid_t()); | |
30 }; | |
31 | |
32 } // namespace chromeos | |
33 | |
34 #endif // CHROMEOS_PROCESS_MOCK_H_ | |
OLD | NEW |