| OLD | NEW |
| 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 LIBRARIES_NACL_IO_TEST_MOCK_FS_H_ | 5 #ifndef TESTS_NACL_IO_TEST_MOCK_FS_H_ |
| 6 #define LIBRARIES_NACL_IO_TEST_MOCK_FS_H_ | 6 #define TESTS_NACL_IO_TEST_MOCK_FS_H_ |
| 7 | 7 |
| 8 #include "gmock/gmock.h" | 8 #include "gmock/gmock.h" |
| 9 | 9 |
| 10 #include "nacl_io/filesystem.h" | 10 #include "nacl_io/filesystem.h" |
| 11 | 11 |
| 12 class MockFs : public nacl_io::Filesystem { | 12 class MockFs : public nacl_io::Filesystem { |
| 13 public: | 13 public: |
| 14 typedef nacl_io::Error Error; | 14 typedef nacl_io::Error Error; |
| 15 typedef nacl_io::FsInitArgs FsInitArgs; | 15 typedef nacl_io::FsInitArgs FsInitArgs; |
| 16 typedef nacl_io::Path Path; | 16 typedef nacl_io::Path Path; |
| 17 typedef nacl_io::PepperInterface PepperInterface; | 17 typedef nacl_io::PepperInterface PepperInterface; |
| 18 typedef nacl_io::ScopedNode ScopedNode; | 18 typedef nacl_io::ScopedNode ScopedNode; |
| 19 typedef nacl_io::StringMap_t StringMap_t; | 19 typedef nacl_io::StringMap_t StringMap_t; |
| 20 | 20 |
| 21 MockFs(); | 21 MockFs(); |
| 22 virtual ~MockFs(); | 22 virtual ~MockFs(); |
| 23 | 23 |
| 24 MOCK_METHOD1(Init, Error(const FsInitArgs&)); | 24 MOCK_METHOD1(Init, Error(const FsInitArgs&)); |
| 25 MOCK_METHOD0(Destroy, void()); | 25 MOCK_METHOD0(Destroy, void()); |
| 26 MOCK_METHOD2(Access, Error(const Path&, int)); | 26 MOCK_METHOD2(Access, Error(const Path&, int)); |
| 27 MOCK_METHOD3(Open, Error(const Path&, int, ScopedNode*)); | 27 MOCK_METHOD3(Open, Error(const Path&, int, ScopedNode*)); |
| 28 MOCK_METHOD2(OpenResource, Error(const Path&, ScopedNode*)); | 28 MOCK_METHOD2(OpenResource, Error(const Path&, ScopedNode*)); |
| 29 MOCK_METHOD1(Unlink, Error(const Path&)); | 29 MOCK_METHOD1(Unlink, Error(const Path&)); |
| 30 MOCK_METHOD2(Mkdir, Error(const Path&, int)); | 30 MOCK_METHOD2(Mkdir, Error(const Path&, int)); |
| 31 MOCK_METHOD1(Rmdir, Error(const Path&)); | 31 MOCK_METHOD1(Rmdir, Error(const Path&)); |
| 32 MOCK_METHOD1(Remove, Error(const Path&)); | 32 MOCK_METHOD1(Remove, Error(const Path&)); |
| 33 MOCK_METHOD2(Rename, Error(const Path&, const Path&)); | 33 MOCK_METHOD2(Rename, Error(const Path&, const Path&)); |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 #endif // LIBRARIES_NACL_IO_TEST_MOCK_FS_H_ | 36 #endif // TESTS_NACL_IO_TEST_MOCK_FS_H_ |
| OLD | NEW |