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

Side by Side Diff: native_client_sdk/src/libraries/nacl_io_test/mount_node_mock.h

Issue 19717004: [NaCl SDK] Add nacl_io and sdk_util namespaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bad copyright in mount_mem Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
1 /* Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 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 5
6 #ifndef LIBRARIES_NACL_IO_TEST_MOUNT_NODE_MOCK_H_ 6 #ifndef LIBRARIES_NACL_IO_TEST_MOUNT_NODE_MOCK_H_
7 #define LIBRARIES_NACL_IO_TEST_MOUNT_NODE_MOCK_H_ 7 #define LIBRARIES_NACL_IO_TEST_MOUNT_NODE_MOCK_H_
8 8
9 #include "gmock/gmock.h" 9 #include "gmock/gmock.h"
10 10
11 #include "nacl_io/mount.h" 11 #include "nacl_io/mount.h"
12 12
13 class MountNodeMock : public MountNode { 13 class MountNodeMock : public nacl_io::MountNode {
14 public: 14 public:
15 explicit MountNodeMock(Mount*); 15 typedef nacl_io::Error Error;
16 typedef nacl_io::ScopedMountNode ScopedMountNode;
17
18 explicit MountNodeMock(nacl_io::Mount*);
16 virtual ~MountNodeMock(); 19 virtual ~MountNodeMock();
17 20
18 MOCK_METHOD1(Init, Error(int)); 21 MOCK_METHOD1(Init, Error(int));
19 MOCK_METHOD0(Destroy, void()); 22 MOCK_METHOD0(Destroy, void());
20 MOCK_METHOD0(FSync, Error()); 23 MOCK_METHOD0(FSync, Error());
21 MOCK_METHOD1(FTruncate, Error(off_t)); 24 MOCK_METHOD1(FTruncate, Error(off_t));
22 MOCK_METHOD4(GetDents, Error(size_t, struct dirent*, size_t, int*)); 25 MOCK_METHOD4(GetDents, Error(size_t, struct dirent*, size_t, int*));
23 MOCK_METHOD1(GetStat, Error(struct stat*)); 26 MOCK_METHOD1(GetStat, Error(struct stat*));
24 MOCK_METHOD2(Ioctl, Error(int, char*)); 27 MOCK_METHOD2(Ioctl, Error(int, char*));
25 MOCK_METHOD4(Read, Error(size_t, void*, size_t, int*)); 28 MOCK_METHOD4(Read, Error(size_t, void*, size_t, int*));
26 MOCK_METHOD4(Write, Error(size_t, const void*, size_t, int*)); 29 MOCK_METHOD4(Write, Error(size_t, const void*, size_t, int*));
27 MOCK_METHOD6(MMap, Error(void*, size_t, int, int, size_t, void**)); 30 MOCK_METHOD6(MMap, Error(void*, size_t, int, int, size_t, void**));
28 MOCK_METHOD0(GetLinks, int()); 31 MOCK_METHOD0(GetLinks, int());
29 MOCK_METHOD0(GetMode, int()); 32 MOCK_METHOD0(GetMode, int());
30 MOCK_METHOD0(GetType, int()); 33 MOCK_METHOD0(GetType, int());
31 MOCK_METHOD1(GetSize, Error(size_t*)); 34 MOCK_METHOD1(GetSize, Error(size_t*));
32 MOCK_METHOD0(IsaDir, bool()); 35 MOCK_METHOD0(IsaDir, bool());
33 MOCK_METHOD0(IsaFile, bool()); 36 MOCK_METHOD0(IsaFile, bool());
34 MOCK_METHOD0(IsaTTY, bool()); 37 MOCK_METHOD0(IsaTTY, bool());
35 MOCK_METHOD0(ChildCount, int()); 38 MOCK_METHOD0(ChildCount, int());
36 MOCK_METHOD2(AddChild, Error(const std::string&, const ScopedMountNode&)); 39 MOCK_METHOD2(AddChild, Error(const std::string&, const ScopedMountNode&));
37 MOCK_METHOD1(RemoveChild, Error(const std::string&)); 40 MOCK_METHOD1(RemoveChild, Error(const std::string&));
38 MOCK_METHOD2(FindChild, Error(const std::string&, ScopedMountNode*)); 41 MOCK_METHOD2(FindChild, Error(const std::string&, ScopedMountNode*));
39 MOCK_METHOD0(Link, void()); 42 MOCK_METHOD0(Link, void());
40 MOCK_METHOD0(Unlink, void()); 43 MOCK_METHOD0(Unlink, void());
41 }; 44 };
42 45
43 #endif // LIBRARIES_NACL_IO_TEST_MOUNT_NODE_MOCK_H_ 46 #endif // LIBRARIES_NACL_IO_TEST_MOUNT_NODE_MOCK_H_
44 47
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698