[M120 Migration][VD] Enable direct rendering for TVPlus
[platform/framework/web/chromium-efl.git] / components / component_updater / mock_component_updater_service.h
1 // Copyright 2015 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Automatically generated by testing/gmock/scripts/generator/gmock_gen.py.
6 // Manual edits:
7 // - Copyright header added.
8 // - Includes and inclusion guard added.
9 // - Constructor and destructor added to satisfy chromium-style checker.
10
11 #ifndef COMPONENTS_COMPONENT_UPDATER_MOCK_COMPONENT_UPDATER_SERVICE_H_
12 #define COMPONENTS_COMPONENT_UPDATER_MOCK_COMPONENT_UPDATER_SERVICE_H_
13
14 #include <memory>
15 #include <string>
16 #include <utility>
17 #include <vector>
18
19 #include "base/functional/callback.h"
20 #include "base/task/sequenced_task_runner.h"
21 #include "base/version.h"
22 #include "components/component_updater/component_installer.h"
23 #include "components/component_updater/component_updater_service.h"
24 #include "testing/gmock/include/gmock/gmock.h"
25
26 namespace component_updater {
27
28 class MockComponentUpdateService : public ComponentUpdateService {
29  public:
30   MockComponentUpdateService();
31   ~MockComponentUpdateService() override;
32
33   void MaybeThrottle(const std::string& id,
34                      base::OnceClosure callback) override {
35     DoMaybeThrottle(id, std::move(callback));
36   }
37
38   base::Version GetRegisteredVersion(const std::string& app_id) override {
39     return base::Version(kNullVersion);
40   }
41
42   MOCK_METHOD1(AddObserver,
43       void(Observer* observer));
44   MOCK_METHOD1(RemoveObserver,
45       void(Observer* observer));
46   MOCK_METHOD1(RegisterComponent, bool(const ComponentRegistration& component));
47   MOCK_METHOD1(UnregisterComponent,
48       bool(const std::string& id));
49   MOCK_CONST_METHOD0(GetComponentIDs,
50       std::vector<std::string>());
51   MOCK_CONST_METHOD0(GetComponents, std::vector<ComponentInfo>());
52   MOCK_METHOD0(GetOnDemandUpdater,
53       OnDemandUpdater&());
54   MOCK_METHOD2(DoMaybeThrottle,
55                void(const std::string& id, const base::OnceClosure& callback));
56   MOCK_METHOD0(GetSequencedTaskRunner,
57       scoped_refptr<base::SequencedTaskRunner>());
58   MOCK_CONST_METHOD2(GetComponentDetails,
59       bool(const std::string& id, CrxUpdateItem* item));
60 };
61
62 }  // namespace component_updater
63
64 #endif  // COMPONENTS_COMPONENT_UPDATER_MOCK_COMPONENT_UPDATER_SERVICE_H_