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

Side by Side Diff: native_client_sdk/src/tests/nacl_io_test/kernel_object_test.cc

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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include <errno.h> 5 #include <errno.h>
6 #include <fcntl.h> 6 #include <fcntl.h>
7 #include <pthread.h> 7 #include <pthread.h>
8 #include <sys/stat.h> 8 #include <sys/stat.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 14 matching lines...) Expand all
25 public: 25 public:
26 explicit NodeForTesting(Filesystem* fs) : Node(fs) {} 26 explicit NodeForTesting(Filesystem* fs) : Node(fs) {}
27 }; 27 };
28 28
29 class FilesystemForTesting : public Filesystem { 29 class FilesystemForTesting : public Filesystem {
30 public: 30 public:
31 FilesystemForTesting() {} 31 FilesystemForTesting() {}
32 32
33 public: 33 public:
34 Error Access(const Path& path, int a_mode) { return ENOSYS; } 34 Error Access(const Path& path, int a_mode) { return ENOSYS; }
35 Error Open(const Path& path, int mode, ScopedNode* out_node) { 35 Error OpenWithMode(const Path& path, int open_flags,
36 mode_t mode, ScopedNode* out_node) {
36 out_node->reset(NULL); 37 out_node->reset(NULL);
37 return ENOSYS; 38 return ENOSYS;
38 } 39 }
39 Error Unlink(const Path& path) { return 0; } 40 Error Unlink(const Path& path) { return 0; }
40 Error Mkdir(const Path& path, int permissions) { return 0; } 41 Error Mkdir(const Path& path, int permissions) { return 0; }
41 Error Rmdir(const Path& path) { return 0; } 42 Error Rmdir(const Path& path) { return 0; }
42 Error Remove(const Path& path) { return 0; } 43 Error Remove(const Path& path) { return 0; }
43 Error Rename(const Path& path, const Path& newpath) { return 0; } 44 Error Rename(const Path& path, const Path& newpath) { return 0; }
44 }; 45 };
45 46
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 EXPECT_EQ(3, raw_handle->RefCount()); 177 EXPECT_EQ(3, raw_handle->RefCount());
177 178
178 179
179 handle.reset(); 180 handle.reset();
180 EXPECT_EQ(2, raw_handle->RefCount()); 181 EXPECT_EQ(2, raw_handle->RefCount());
181 182
182 proxy.AcquireHandle(5, &handle); 183 proxy.AcquireHandle(5, &handle);
183 EXPECT_EQ(3, raw_handle->RefCount()); 184 EXPECT_EQ(3, raw_handle->RefCount());
184 EXPECT_EQ(raw_handle, handle.get()); 185 EXPECT_EQ(raw_handle, handle.get());
185 } 186 }
OLDNEW
« no previous file with comments | « native_client_sdk/src/tests/nacl_io_test/jspipe_test.cc ('k') | native_client_sdk/src/tests/nacl_io_test/kernel_proxy_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698