OLD | NEW |
| (Empty) |
1 /* Copyright (c) 2012 The Chromium 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 | |
6 #ifndef LIBRARIES_NACL_MOUNTS_TEST_KERNEL_PROXY_MOCK_H_ | |
7 #define LIBRARIES_NACL_MOUNTS_TEST_KERNEL_PROXY_MOCK_H_ | |
8 | |
9 #include <sys/types.h> | |
10 #include <sys/stat.h> | |
11 #include "gmock/gmock.h" | |
12 | |
13 #include "nacl_mounts/kernel_proxy.h" | |
14 | |
15 class KernelProxyMock : public KernelProxy { | |
16 public: | |
17 KernelProxyMock(); | |
18 virtual ~KernelProxyMock(); | |
19 | |
20 MOCK_METHOD2(access, int(const char*, int)); | |
21 MOCK_METHOD1(chdir, int(const char*)); | |
22 MOCK_METHOD2(chmod, int(const char*, mode_t)); | |
23 MOCK_METHOD1(close, int(int)); | |
24 MOCK_METHOD1(dup, int(int)); | |
25 MOCK_METHOD2(dup2, int(int, int)); | |
26 MOCK_METHOD2(fstat, int(int, struct stat*)); | |
27 MOCK_METHOD1(fsync, int(int)); | |
28 MOCK_METHOD2(getcwd, char*(char*, size_t)); | |
29 MOCK_METHOD3(getdents, int(int, void*, unsigned int)); | |
30 MOCK_METHOD1(getwd, char*(char*)); | |
31 MOCK_METHOD1(isatty, int(int)); | |
32 MOCK_METHOD3(lseek, off_t(int, off_t, int)); | |
33 MOCK_METHOD2(mkdir, int(const char*, mode_t)); | |
34 MOCK_METHOD5(mount, int(const char*, const char*, const char*, unsigned long, | |
35 const void*)); | |
36 MOCK_METHOD2(open, int(const char*, int)); | |
37 MOCK_METHOD3(read, ssize_t(int, void*, size_t)); | |
38 MOCK_METHOD1(remove, int(const char*)); | |
39 MOCK_METHOD1(rmdir, int(const char*)); | |
40 MOCK_METHOD2(stat, int(const char*, struct stat*)); | |
41 MOCK_METHOD1(umount, int(const char*)); | |
42 MOCK_METHOD1(unlink, int(const char*)); | |
43 MOCK_METHOD3(write, ssize_t(int, const void*, size_t)); | |
44 MOCK_METHOD2(link, int(const char*, const char*)); | |
45 MOCK_METHOD2(symlink, int(const char*, const char*)); | |
46 }; | |
47 | |
48 #endif // LIBRARIES_NACL_MOUNTS_TEST_KERNEL_PROXY_MOCK_H_ | |
OLD | NEW |