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

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

Issue 565763002: Plumbing though mode parameter to open, since fusefs can make use of it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes 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_FS_H_ 5 #ifndef TESTS_NACL_IO_TEST_MOCK_FS_H_
6 #define TESTS_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_METHOD4(OpenWithMode, Error(const Path&, int, mode_t, ScopedNode*));
28 MOCK_METHOD2(OpenResource, Error(const Path&, ScopedNode*)); 29 MOCK_METHOD2(OpenResource, Error(const Path&, ScopedNode*));
29 MOCK_METHOD1(Unlink, Error(const Path&)); 30 MOCK_METHOD1(Unlink, Error(const Path&));
30 MOCK_METHOD2(Mkdir, Error(const Path&, int)); 31 MOCK_METHOD2(Mkdir, Error(const Path&, int));
31 MOCK_METHOD1(Rmdir, Error(const Path&)); 32 MOCK_METHOD1(Rmdir, Error(const Path&));
32 MOCK_METHOD1(Remove, Error(const Path&)); 33 MOCK_METHOD1(Remove, Error(const Path&));
33 MOCK_METHOD2(Rename, Error(const Path&, const Path&)); 34 MOCK_METHOD2(Rename, Error(const Path&, const Path&));
34 }; 35 };
35 36
36 #endif // TESTS_NACL_IO_TEST_MOCK_FS_H_ 37 #endif // TESTS_NACL_IO_TEST_MOCK_FS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698