blob: 61c54c20abdda37cb1f683e41e99ceed75716941 [file] [log] [blame]
// Copyright 2016 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IMAGELOADER_MOCK_HELPER_PROCESS_H_
#define IMAGELOADER_MOCK_HELPER_PROCESS_H_
#include "gmock/gmock.h"
#include "helper_process.h"
#include "imageloader_impl.h"
namespace imageloader {
// Mock helper process used for unit testing.
class MockHelperProcess : public HelperProcess {
public:
MockHelperProcess() {}
~MockHelperProcess() {}
// Sends a message telling the helper process to mount the file backed by |fd|
// at the |path|.
MOCK_METHOD4(SendMountCommand, bool(int, const std::string&,
FileSystem, const std::string&));
MOCK_METHOD3(SendUnmountAllCommand, bool(bool,
const std::string&,
std::vector<std::string>* paths));
MOCK_METHOD1(SendUnmountCommand, bool(const std::string&));
private:
DISALLOW_COPY_AND_ASSIGN(MockHelperProcess);
};
} // namespace imageloader
#endif // IMAGELOADER_MOCK_HELPER_PROCESS_H_