1// Copyright (c) 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 LIBRARIES_NACL_IO_TEST_MOUNT_MOCK_H_ 6#define LIBRARIES_NACL_IO_TEST_MOUNT_MOCK_H_ 7 8#include "gmock/gmock.h" 9 10#include "nacl_io/mount.h" 11 12class MountMock : public nacl_io::Mount { 13 public: 14 typedef nacl_io::Error Error; 15 typedef nacl_io::Path Path; 16 typedef nacl_io::PepperInterface PepperInterface; 17 typedef nacl_io::ScopedMountNode ScopedMountNode; 18 typedef nacl_io::StringMap_t StringMap_t; 19 20 MountMock(); 21 virtual ~MountMock(); 22 23 MOCK_METHOD3(Init, Error(int, StringMap_t&, PepperInterface*)); 24 MOCK_METHOD0(Destroy, void()); 25 MOCK_METHOD2(Access, Error(const Path&, int)); 26 MOCK_METHOD3(Open, Error(const Path&, int, ScopedMountNode*)); 27 MOCK_METHOD2(OpenResource, Error(const Path&, ScopedMountNode*)); 28 MOCK_METHOD1(Unlink, Error(const Path&)); 29 MOCK_METHOD2(Mkdir, Error(const Path&, int)); 30 MOCK_METHOD1(Rmdir, Error(const Path&)); 31 MOCK_METHOD1(Remove, Error(const Path&)); 32}; 33 34#endif // LIBRARIES_NACL_IO_TEST_MOUNT_MOCK_H_ 35