Description: 修复text_test_ng测试套

IssueNo: https://gitee.com/openharmony/arkui_ace_engine/issues/IA5SGQ
Feature or Bugfix: Bugfix
Binary Source:No
Signed-off-by: chenjiafeng <chenjiafeng10@huawei.com>
This commit is contained in:
unknown 2024-06-16 21:49:43 +08:00
parent c2357682e8
commit 363085d10f
2 changed files with 4 additions and 0 deletions

View File

@ -49,6 +49,9 @@ void TextBases::SuppressMockParagraph()
std::pair<RefPtr<FrameNode>, RefPtr<TextPattern>> TextBases::Init()
{
auto themeManager = AceType::MakeRefPtr<MockThemeManager>();
MockPipelineContext::GetCurrent()->SetThemeManager(themeManager);
EXPECT_CALL(*themeManager, GetTheme(_)).WillRepeatedly(Return(AceType::MakeRefPtr<TextOverlayTheme>()));
TextModelNG textModelNG;
textModelNG.Create(CREATE_VALUE);
auto pattern = AceType::MakeRefPtr<TextPattern>();

View File

@ -41,6 +41,7 @@
#include "base/memory/referenced.h"
#include "core/components/common/layout/constants.h"
#include "core/components/common/properties/text_style_parser.h"
#include "core/components/text_overlay/text_overlay_theme.h"
#include "core/components_ng/base/frame_node.h"
#include "core/components_ng/base/geometry_node.h"
#include "core/components_ng/base/view_stack_processor.h"