Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: native_client_sdk/src/tests/nacl_io_test/mock_kernel_proxy.h

Issue 565343002: [NaCl SDK] nacl_io: Plumb through {,f}utime{,s} (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef TESTS_NACL_IO_TEST_MOCK_KERNEL_PROXY_H_ 5 #ifndef TESTS_NACL_IO_TEST_MOCK_KERNEL_PROXY_H_
6 #define TESTS_NACL_IO_TEST_MOCK_KERNEL_PROXY_H_ 6 #define TESTS_NACL_IO_TEST_MOCK_KERNEL_PROXY_H_
7 7
8 #include <sys/types.h> 8 #include <sys/types.h>
9 #include <sys/stat.h> 9 #include <sys/stat.h>
10 #include "gmock/gmock.h" 10 #include "gmock/gmock.h"
(...skipping 11 matching lines...) Expand all
22 MOCK_METHOD1(chdir, int(const char*)); 22 MOCK_METHOD1(chdir, int(const char*));
23 MOCK_METHOD2(chmod, int(const char*, mode_t)); 23 MOCK_METHOD2(chmod, int(const char*, mode_t));
24 MOCK_METHOD3(chown, int(const char*, uid_t, gid_t)); 24 MOCK_METHOD3(chown, int(const char*, uid_t, gid_t));
25 MOCK_METHOD1(close, int(int)); 25 MOCK_METHOD1(close, int(int));
26 MOCK_METHOD1(dup, int(int)); 26 MOCK_METHOD1(dup, int(int));
27 MOCK_METHOD2(dup2, int(int, int)); 27 MOCK_METHOD2(dup2, int(int, int));
28 MOCK_METHOD1(fchdir, int(int)); 28 MOCK_METHOD1(fchdir, int(int));
29 MOCK_METHOD2(fchmod, int(int, int)); 29 MOCK_METHOD2(fchmod, int(int, int));
30 MOCK_METHOD3(fchown, int(int, uid_t, gid_t)); 30 MOCK_METHOD3(fchown, int(int, uid_t, gid_t));
31 MOCK_METHOD3(fcntl, int(int, int, va_list)); 31 MOCK_METHOD3(fcntl, int(int, int, va_list));
32 MOCK_METHOD1(fdatasync, int(int));
32 MOCK_METHOD2(ftruncate, int(int, off_t)); 33 MOCK_METHOD2(ftruncate, int(int, off_t));
33 MOCK_METHOD2(fstat, int(int, struct stat*)); 34 MOCK_METHOD2(fstat, int(int, struct stat*));
34 MOCK_METHOD1(fsync, int(int)); 35 MOCK_METHOD1(fsync, int(int));
35 MOCK_METHOD1(fdatasync, int(int)); 36 MOCK_METHOD2(futimens, int(int, const struct timespec[2]));
36 MOCK_METHOD2(getcwd, char*(char*, size_t)); 37 MOCK_METHOD2(getcwd, char*(char*, size_t));
37 MOCK_METHOD3(getdents, int(int, void*, unsigned int)); 38 MOCK_METHOD3(getdents, int(int, void*, unsigned int));
38 MOCK_METHOD1(getwd, char*(char*)); 39 MOCK_METHOD1(getwd, char*(char*));
39 MOCK_METHOD3(ioctl, int(int, int, va_list)); 40 MOCK_METHOD3(ioctl, int(int, int, va_list));
40 MOCK_METHOD1(isatty, int(int)); 41 MOCK_METHOD1(isatty, int(int));
41 MOCK_METHOD2(kill, int(int, int)); 42 MOCK_METHOD2(kill, int(int, int));
42 MOCK_METHOD3(lchown, int(const char*, uid_t, gid_t)); 43 MOCK_METHOD3(lchown, int(const char*, uid_t, gid_t));
43 MOCK_METHOD2(link, int(const char*, const char*)); 44 MOCK_METHOD2(link, int(const char*, const char*));
44 MOCK_METHOD3(lseek, off_t(int, off_t, int)); 45 MOCK_METHOD3(lseek, off_t(int, off_t, int));
45 MOCK_METHOD2(lstat, int(const char*, struct stat*)); 46 MOCK_METHOD2(lstat, int(const char*, struct stat*));
46 MOCK_METHOD2(mkdir, int(const char*, mode_t)); 47 MOCK_METHOD2(mkdir, int(const char*, mode_t));
47 MOCK_METHOD6(mmap, void*(void*, size_t, int, int, int, size_t)); 48 MOCK_METHOD6(mmap, void*(void*, size_t, int, int, int, size_t));
48 MOCK_METHOD5(mount, int(const char*, const char*, const char*, unsigned long, 49 MOCK_METHOD5(mount, int(const char*, const char*, const char*, unsigned long,
49 const void*)); 50 const void*));
50 MOCK_METHOD2(munmap, int(void*, size_t)); 51 MOCK_METHOD2(munmap, int(void*, size_t));
51 MOCK_METHOD3(open, int(const char*, int, mode_t)); 52 MOCK_METHOD3(open, int(const char*, int, mode_t));
53 MOCK_METHOD1(open_resource, int(const char*));
52 MOCK_METHOD1(pipe, int(int[2])); 54 MOCK_METHOD1(pipe, int(int[2]));
53 MOCK_METHOD3(read, ssize_t(int, void*, size_t)); 55 MOCK_METHOD3(read, ssize_t(int, void*, size_t));
54 MOCK_METHOD3(readlink, int(const char*, char*, size_t count)); 56 MOCK_METHOD3(readlink, int(const char*, char*, size_t count));
55 MOCK_METHOD1(remove, int(const char*)); 57 MOCK_METHOD1(remove, int(const char*));
56 MOCK_METHOD2(rename, int(const char*, const char*)); 58 MOCK_METHOD2(rename, int(const char*, const char*));
57 MOCK_METHOD1(rmdir, int(const char*)); 59 MOCK_METHOD1(rmdir, int(const char*));
58 MOCK_METHOD3(sigaction, int(int, const struct sigaction*, struct sigaction*)); 60 MOCK_METHOD3(sigaction, int(int, const struct sigaction*, struct sigaction*));
59 MOCK_METHOD2(stat, int(const char*, struct stat*)); 61 MOCK_METHOD2(stat, int(const char*, struct stat*));
60 MOCK_METHOD2(symlink, int(const char*, const char*)); 62 MOCK_METHOD2(symlink, int(const char*, const char*));
61 MOCK_METHOD2(tcflush, int(int, int)); 63 MOCK_METHOD2(tcflush, int(int, int));
62 MOCK_METHOD2(tcgetattr, int(int, struct termios*)); 64 MOCK_METHOD2(tcgetattr, int(int, struct termios*));
63 MOCK_METHOD3(tcsetattr, int(int, int, const struct termios*)); 65 MOCK_METHOD3(tcsetattr, int(int, int, const struct termios*));
66 MOCK_METHOD2(truncate, int(const char*, off_t));
64 MOCK_METHOD1(umount, int(const char*)); 67 MOCK_METHOD1(umount, int(const char*));
65 MOCK_METHOD2(truncate, int(const char*, off_t));
66 MOCK_METHOD1(unlink, int(const char*)); 68 MOCK_METHOD1(unlink, int(const char*));
67 MOCK_METHOD2(utime, int(const char*, const struct utimbuf*)); 69 MOCK_METHOD2(utimens, int(const char*, const struct timespec[2]));
68 MOCK_METHOD2(utimes, int(const char*, const struct timeval[2]));
69 MOCK_METHOD3(write, ssize_t(int, const void*, size_t)); 70 MOCK_METHOD3(write, ssize_t(int, const void*, size_t));
70 MOCK_METHOD1(open_resource, int(const char*));
71 71
72 #ifdef PROVIDES_SOCKET_API 72 #ifdef PROVIDES_SOCKET_API
73 MOCK_METHOD3(poll, int(struct pollfd*, nfds_t, int)); 73 MOCK_METHOD3(poll, int(struct pollfd*, nfds_t, int));
74 MOCK_METHOD5(select, int(int, fd_set*, fd_set*, fd_set*, struct timeval*)); 74 MOCK_METHOD5(select, int(int, fd_set*, fd_set*, fd_set*, struct timeval*));
75 75
76 // Socket support functions 76 // Socket support functions
77 MOCK_METHOD3(accept, int(int, struct sockaddr*, socklen_t*)); 77 MOCK_METHOD3(accept, int(int, struct sockaddr*, socklen_t*));
78 MOCK_METHOD3(bind, int(int, const struct sockaddr*, socklen_t)); 78 MOCK_METHOD3(bind, int(int, const struct sockaddr*, socklen_t));
79 MOCK_METHOD3(connect, int(int, const struct sockaddr*, socklen_t)); 79 MOCK_METHOD3(connect, int(int, const struct sockaddr*, socklen_t));
80 MOCK_METHOD1(gethostbyname, struct hostent*(const char*)); 80 MOCK_METHOD1(gethostbyname, struct hostent*(const char*));
(...skipping 10 matching lines...) Expand all
91 const struct sockaddr*, socklen_t)); 91 const struct sockaddr*, socklen_t));
92 MOCK_METHOD3(sendmsg, ssize_t(int, const struct msghdr*, int)); 92 MOCK_METHOD3(sendmsg, ssize_t(int, const struct msghdr*, int));
93 MOCK_METHOD5(setsockopt, int(int, int, int, const void*, socklen_t)); 93 MOCK_METHOD5(setsockopt, int(int, int, int, const void*, socklen_t));
94 MOCK_METHOD2(shutdown, int(int, int)); 94 MOCK_METHOD2(shutdown, int(int, int));
95 MOCK_METHOD3(socket, int(int, int, int)); 95 MOCK_METHOD3(socket, int(int, int, int));
96 MOCK_METHOD4(socketpair, int(int, int, int, int*)); 96 MOCK_METHOD4(socketpair, int(int, int, int, int*));
97 #endif // PROVIDES_SOCKET_API 97 #endif // PROVIDES_SOCKET_API
98 }; 98 };
99 99
100 #endif // TESTS_NACL_IO_TEST_MOCK_KERNEL_PROXY_H_ 100 #endif // TESTS_NACL_IO_TEST_MOCK_KERNEL_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698