diff --git a/previewer/mock/ui_content.h b/previewer/mock/ui_content.h index 7646f688b2..93eefcc572 100644 --- a/previewer/mock/ui_content.h +++ b/previewer/mock/ui_content.h @@ -16,6 +16,7 @@ #ifndef FOUNDATION_ACE_INTERFACE_INNERKITS_ACE_UI_CONTENT_H #define FOUNDATION_ACE_INTERFACE_INNERKITS_ACE_UI_CONTENT_H +#include #include #include @@ -27,6 +28,7 @@ class Context; namespace AppExecFwk { class Configuration; class Ability; +class FormAshmem; } namespace Rosen { @@ -104,19 +106,19 @@ public: virtual void SetAppWindowIcon(const std::shared_ptr& pixelMap) = 0; // ArkTS Form - virtual std::shared_ptr GetCardRootNode() - { - return nullptr; - } + virtual std::shared_ptr GetFormRootNode() = 0; + + virtual void UpdateFormDate(const std::string& data) = 0; - virtual void ProcessFormUpdate(const std::string& data) = 0; virtual void SetFormWidth(const float width) = 0; virtual void SetFormHeight(const float height) = 0; virtual float GetFormWidth() = 0; virtual float GetFormHeight() = 0; virtual void SetActionEventHandler( - std::function&& actionCallback) = 0; + std::function&& actionCallback) = 0; + virtual void SetErrorEventHandler( + std::function&& errorCallback) = 0; }; } // namespace OHOS::Ace diff --git a/test/common/mock/mock_uicontent.h b/test/common/mock/mock_uicontent.h index ba5b26ae60..743a306711 100644 --- a/test/common/mock/mock_uicontent.h +++ b/test/common/mock/mock_uicontent.h @@ -24,6 +24,7 @@ namespace OHOS { namespace AppExecFwk { class Ability; class Configuration; + class FormAshmem; } // namespace AppExecFwk namespace AAFwk { class Want; @@ -66,13 +67,15 @@ public: MOCK_METHOD1(NotifyMemoryLevel, void(int32_t level)); MOCK_METHOD1(SetAppWindowTitle, void(const std::string& title)); MOCK_METHOD1(SetAppWindowIcon, void(const std::shared_ptr& pixelMap)); - MOCK_METHOD0(GetCardRootNode, std::shared_ptr()); - MOCK_METHOD1(ProcessFormUpdate, void(const std::string& data)); + MOCK_METHOD0(GetFormRootNode, std::shared_ptr()); + MOCK_METHOD1(UpdateFormDate, void(const std::string& data)); MOCK_METHOD1(SetFormWidth, void(const float width)); MOCK_METHOD1(SetFormHeight, void(const float height)); MOCK_METHOD0(GetFormWidth, float()); MOCK_METHOD0(GetFormHeight, float()); MOCK_METHOD1(SetActionEventHandler, void(std::function&& actionCallback)); + MOCK_METHOD1(SetErrorEventHandler, + void(std::function&& actionCallback)); }; } // namespace Ace } // namespace OHOS