1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
ash / public / cpp / holding_space / mock_holding_space_client.h [blame]
// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_PUBLIC_CPP_HOLDING_SPACE_MOCK_HOLDING_SPACE_CLIENT_H_
#define ASH_PUBLIC_CPP_HOLDING_SPACE_MOCK_HOLDING_SPACE_CLIENT_H_
#include <vector>
#include "ash/public/cpp/holding_space/holding_space_client.h"
#include "base/files/file_path.h"
#include "base/functional/callback.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace ash {
// A mock implementation of `HoldingSpaceClient` for use in testing.
class MockHoldingSpaceClient : public HoldingSpaceClient {
public:
MockHoldingSpaceClient();
MockHoldingSpaceClient(const MockHoldingSpaceClient&) = delete;
MockHoldingSpaceClient& operator=(const MockHoldingSpaceClient&) = delete;
~MockHoldingSpaceClient() override;
// HoldingSpaceClient:
MOCK_METHOD(const std::string&,
AddItemOfType,
(HoldingSpaceItem::Type type, const base::FilePath& file_path),
(override));
MOCK_METHOD(void,
CopyImageToClipboard,
(const HoldingSpaceItem& item, SuccessCallback callback),
(override));
MOCK_METHOD(base::FilePath,
CrackFileSystemUrl,
(const GURL& file_system_url),
(const, override));
MOCK_METHOD(bool, IsDriveDisabled, (), (const, override));
MOCK_METHOD(void, OpenDownloads, (SuccessCallback callback), (override));
MOCK_METHOD(void, OpenMyFiles, (SuccessCallback callback), (override));
MOCK_METHOD(void,
OpenItems,
(const std::vector<const HoldingSpaceItem*>& items,
SuccessCallback callback),
(override));
MOCK_METHOD(void,
PinFiles,
(const std::vector<base::FilePath>& file_paths),
(override));
MOCK_METHOD(void, RefreshSuggestions, (), (override));
MOCK_METHOD(void,
RemoveSuggestions,
(const std::vector<base::FilePath>& absolute_file_paths),
(override));
MOCK_METHOD(void,
PinItems,
(const std::vector<const HoldingSpaceItem*>& items),
(override));
MOCK_METHOD(void,
ShowItemInFolder,
(const HoldingSpaceItem& item,
SuccessCallback callback),
(override));
MOCK_METHOD(void,
UnpinItems,
(const std::vector<const HoldingSpaceItem*>& items),
(override));
};
} // namespace ash
#endif // ASH_PUBLIC_CPP_HOLDING_SPACE_MOCK_HOLDING_SPACE_CLIENT_H_