OLD | NEW |
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_MOCK_H_ | 6 #ifndef LIBRARIES_NACL_IO_TEST_MOUNT_MOCK_H_ |
7 #define LIBRARIES_NACL_IO_TEST_MOUNT_MOCK_H_ | 7 #define LIBRARIES_NACL_IO_TEST_MOUNT_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 MountMock : public Mount { | 13 class MountMock : public nacl_io::Mount { |
14 public: | 14 public: |
| 15 typedef nacl_io::Error Error; |
| 16 typedef nacl_io::Path Path; |
| 17 typedef nacl_io::PepperInterface PepperInterface; |
| 18 typedef nacl_io::ScopedMountNode ScopedMountNode; |
| 19 typedef nacl_io::StringMap_t StringMap_t; |
| 20 |
15 MountMock(); | 21 MountMock(); |
16 virtual ~MountMock(); | 22 virtual ~MountMock(); |
17 | 23 |
18 MOCK_METHOD3(Init, Error(int, StringMap_t&, PepperInterface*)); | 24 MOCK_METHOD3(Init, Error(int, StringMap_t&, PepperInterface*)); |
19 MOCK_METHOD0(Destroy, void()); | 25 MOCK_METHOD0(Destroy, void()); |
20 MOCK_METHOD2(Access, Error(const Path&, int)); | 26 MOCK_METHOD2(Access, Error(const Path&, int)); |
21 MOCK_METHOD3(Open, Error(const Path&, int, ScopedMountNode*)); | 27 MOCK_METHOD3(Open, Error(const Path&, int, ScopedMountNode*)); |
22 MOCK_METHOD2(OpenResource, Error(const Path&, ScopedMountNode*)); | 28 MOCK_METHOD2(OpenResource, Error(const Path&, ScopedMountNode*)); |
23 MOCK_METHOD1(Unlink, Error(const Path&)); | 29 MOCK_METHOD1(Unlink, Error(const Path&)); |
24 MOCK_METHOD2(Mkdir, Error(const Path&, int)); | 30 MOCK_METHOD2(Mkdir, Error(const Path&, int)); |
25 MOCK_METHOD1(Rmdir, Error(const Path&)); | 31 MOCK_METHOD1(Rmdir, Error(const Path&)); |
26 MOCK_METHOD1(Remove, Error(const Path&)); | 32 MOCK_METHOD1(Remove, Error(const Path&)); |
27 }; | 33 }; |
28 | 34 |
29 #endif // LIBRARIES_NACL_IO_TEST_MOUNT_MOCK_H_ | 35 #endif // LIBRARIES_NACL_IO_TEST_MOUNT_MOCK_H_ |
30 | 36 |
OLD | NEW |