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

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

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) 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 5
6 #include <errno.h> 6 #include <errno.h>
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <pthread.h> 8 #include <pthread.h>
9 #include <sys/stat.h> 9 #include <sys/stat.h>
10 10
11 #include <map> 11 #include <map>
12 #include <string> 12 #include <string>
13 13
14 #include "nacl_io/kernel_handle.h" 14 #include "nacl_io/kernel_handle.h"
15 #include "nacl_io/kernel_object.h" 15 #include "nacl_io/kernel_object.h"
16 #include "nacl_io/mount.h" 16 #include "nacl_io/mount.h"
17 #include "nacl_io/path.h" 17 #include "nacl_io/path.h"
18 18
19 #include "gtest/gtest.h" 19 #include "gtest/gtest.h"
20 20
21 using namespace nacl_io;
22
21 namespace { 23 namespace {
22 24
23 class MountNodeRefMock : public MountNode { 25 class MountNodeRefMock : public MountNode {
24 public: 26 public:
25 MountNodeRefMock(Mount* mnt) : MountNode(mnt) {} 27 MountNodeRefMock(Mount* mnt) : MountNode(mnt) {}
26 }; 28 };
27 29
28 class MountRefMock : public Mount { 30 class MountRefMock : public Mount {
29 public: 31 public:
30 MountRefMock() {} 32 MountRefMock() {}
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 EXPECT_EQ(3, raw_handle->RefCount()); 184 EXPECT_EQ(3, raw_handle->RefCount());
183 185
184 handle.reset(); 186 handle.reset();
185 EXPECT_EQ(2, raw_handle->RefCount()); 187 EXPECT_EQ(2, raw_handle->RefCount());
186 188
187 proxy->AcquireHandle(5, &handle); 189 proxy->AcquireHandle(5, &handle);
188 EXPECT_EQ(3, raw_handle->RefCount()); 190 EXPECT_EQ(3, raw_handle->RefCount());
189 EXPECT_EQ(raw_handle, handle.get()); 191 EXPECT_EQ(raw_handle, handle.get());
190 } 192 }
191 193
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698