Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / native_client_sdk / src / tests / nacl_io_test / dev_fs_for_testing.h
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
3 // found in the LICENSE file.
4
5 #ifndef TESTS_NACL_IO_TEST_DEV_FS_FOR_TESTING_H_
6 #define TESTS_NACL_IO_TEST_DEV_FS_FOR_TESTING_H_
7
8 #include "fake_ppapi/fake_pepper_interface.h"
9 #include "gmock/gmock.h"
10 #include "nacl_io/devfs/dev_fs.h"
11 #include "nacl_io/filesystem.h"
12
13 #define NULL_NODE ((Node*)NULL)
14
15 class DevFsForTesting : public nacl_io::DevFs {
16  public:
17   explicit DevFsForTesting(nacl_io::PepperInterface* ppapi) {
18     nacl_io::FsInitArgs args(1);
19     args.ppapi = ppapi;
20     Init(args);
21   }
22
23   int num_nodes() { return (int)inode_pool_.size(); }
24 };
25
26 #endif  // TESTS_NACL_IO_TEST_DEV_FS_FOR_TESTING_H_