1 /* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef FOUNDATION_ACE_INTERFACE_INNERKITS_FORM_MOCK_FORM_RENDER_DELEGATE_STUB_H 17 #define FOUNDATION_ACE_INTERFACE_INNERKITS_FORM_MOCK_FORM_RENDER_DELEGATE_STUB_H 18 19 #include "gmock/gmock.h" 20 21 #include "iremote_broker.h" 22 #include "iremote_object.h" 23 24 namespace OHOS { 25 namespace Ace { 26 class MockFormRenderDelegateStub : public FormRendererDelegateStub { 27 public: 28 MOCK_METHOD3(OnSurfaceCreate, int32_t(const std::shared_ptr<Rosen::RSSurfaceNode>& surfaceNode, 29 const AppExecFwk::FormJsInfo& formJsInfo, const AAFwk::Want& want)); 30 MOCK_METHOD3(OnSurfaceReuse, int32_t(uint64_t surfaceId, const AppExecFwk::FormJsInfo& formJsInfo, 31 const AAFwk::Want& want)); 32 MOCK_METHOD1(OnSurfaceRelease, int32_t(uint64_t surfaceId)); 33 MOCK_METHOD1(OnActionEvent, int32_t(const std::string& action)); 34 MOCK_METHOD2(OnError, int32_t(const std::string& code, const std::string& msg)); 35 MOCK_METHOD3(OnSurfaceChange, int32_t(float width, float height, float borderWidth)); 36 MOCK_METHOD1(OnSurfaceDetach, int32_t(uint64_t surfaceId)); 37 MOCK_METHOD1(OnFormLinkInfoUpdate, int32_t(const std::vector<std::string>& formLinkInfos)); 38 MOCK_METHOD1(OnGetRectRelativeToWindow, int32_t(AccessibilityParentRectInfo& parentRectInfo)); 39 MOCK_METHOD1(OnCheckManagerDelegate, int32_t(bool &checkFlag)); 40 MOCK_METHOD1(OnUpdateFormDone, int32_t(const int64_t formId)); 41 }; 42 } // namespace Ace 43 } // namespace OHOS 44 #endif 45