OLD | NEW |
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 * Use of this source code is governed by a BSD-style license that can be |
3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
4 */ | 4 */ |
5 | 5 |
6 #ifndef LIBRARIES_NACL_IO_TEST_KERNEL_PROXY_MOCK_H_ | 6 #ifndef LIBRARIES_NACL_IO_TEST_KERNEL_PROXY_MOCK_H_ |
7 #define LIBRARIES_NACL_IO_TEST_KERNEL_PROXY_MOCK_H_ | 7 #define LIBRARIES_NACL_IO_TEST_KERNEL_PROXY_MOCK_H_ |
8 | 8 |
9 #include <sys/types.h> | 9 #include <sys/types.h> |
10 #include <sys/stat.h> | 10 #include <sys/stat.h> |
11 #include "gmock/gmock.h" | 11 #include "gmock/gmock.h" |
12 | 12 |
13 #include "nacl_io/kernel_proxy.h" | 13 #include "nacl_io/kernel_proxy.h" |
14 | 14 |
15 class KernelProxyMock : public KernelProxy { | 15 class KernelProxyMock : public nacl_io::KernelProxy { |
16 public: | 16 public: |
17 KernelProxyMock(); | 17 KernelProxyMock(); |
18 virtual ~KernelProxyMock(); | 18 virtual ~KernelProxyMock(); |
19 | 19 |
20 MOCK_METHOD2(access, int(const char*, int)); | 20 MOCK_METHOD2(access, int(const char*, int)); |
21 MOCK_METHOD1(chdir, int(const char*)); | 21 MOCK_METHOD1(chdir, int(const char*)); |
22 MOCK_METHOD2(chmod, int(const char*, mode_t)); | 22 MOCK_METHOD2(chmod, int(const char*, mode_t)); |
23 MOCK_METHOD3(chown, int(const char*, uid_t, gid_t)); | 23 MOCK_METHOD3(chown, int(const char*, uid_t, gid_t)); |
24 MOCK_METHOD1(close, int(int)); | 24 MOCK_METHOD1(close, int(int)); |
25 MOCK_METHOD1(dup, int(int)); | 25 MOCK_METHOD1(dup, int(int)); |
(...skipping 21 matching lines...) Expand all Loading... |
47 MOCK_METHOD1(unlink, int(const char*)); | 47 MOCK_METHOD1(unlink, int(const char*)); |
48 MOCK_METHOD2(utime, int(const char*, const struct utimbuf*)); | 48 MOCK_METHOD2(utime, int(const char*, const struct utimbuf*)); |
49 MOCK_METHOD3(write, ssize_t(int, const void*, size_t)); | 49 MOCK_METHOD3(write, ssize_t(int, const void*, size_t)); |
50 MOCK_METHOD2(link, int(const char*, const char*)); | 50 MOCK_METHOD2(link, int(const char*, const char*)); |
51 MOCK_METHOD2(symlink, int(const char*, const char*)); | 51 MOCK_METHOD2(symlink, int(const char*, const char*)); |
52 MOCK_METHOD6(mmap, void*(void*, size_t, int, int, int, size_t)); | 52 MOCK_METHOD6(mmap, void*(void*, size_t, int, int, int, size_t)); |
53 MOCK_METHOD1(open_resource, int(const char*)); | 53 MOCK_METHOD1(open_resource, int(const char*)); |
54 }; | 54 }; |
55 | 55 |
56 #endif // LIBRARIES_NACL_IO_TEST_KERNEL_PROXY_MOCK_H_ | 56 #endif // LIBRARIES_NACL_IO_TEST_KERNEL_PROXY_MOCK_H_ |
OLD | NEW |