mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-30 10:43:03 +00:00
Merge branch 'master' of https://gitee.com/jiangzhijun8/arkui_ace_engine_tdd_momo_260
This commit is contained in:
commit
9688bca179
@ -44,7 +44,6 @@ void RichEditorPatternTestTwoNg::SetUp()
|
||||
V2::RICH_EDITOR_ETS_TAG, nodeId, []() { return AceType::MakeRefPtr<RichEditorPattern>(); });
|
||||
ASSERT_NE(richEditorNode_, nullptr);
|
||||
auto richEditorPattern = richEditorNode_->GetPattern<RichEditorPattern>();
|
||||
richEditorPattern->InitScrollablePattern();
|
||||
richEditorPattern->SetRichEditorController(AceType::MakeRefPtr<RichEditorController>());
|
||||
richEditorPattern->GetRichEditorController()->SetPattern(AceType::WeakClaim(AceType::RawPtr(richEditorPattern)));
|
||||
richEditorPattern->CreateNodePaintMethod();
|
||||
@ -262,4 +261,23 @@ HWTEST_F(RichEditorPatternTestTwoNg, AdjustWordSelection001, TestSize.Level1)
|
||||
ret = richEditorPattern->AdjustWordSelection(start, end);
|
||||
EXPECT_FALSE(ret);
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: InitScrollablePattern003
|
||||
* @tc.desc: test InitScrollablePattern.
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
HWTEST_F(RichEditorPatternTestTwoNg, InitScrollablePattern003, TestSize.Level1)
|
||||
{
|
||||
ASSERT_NE(richEditorNode_, nullptr);
|
||||
auto richEditorPattern = richEditorNode_->GetPattern<RichEditorPattern>();
|
||||
ASSERT_NE(richEditorPattern, nullptr);
|
||||
auto themeManager = AceType::MakeRefPtr<MockThemeManager>();
|
||||
ASSERT_NE(themeManager, nullptr);
|
||||
EXPECT_CALL(*themeManager, GetTheme(_)).WillRepeatedly(Return(AceType::MakeRefPtr<RichEditorTheme>()));
|
||||
PipelineBase::GetCurrentContext()->themeManager_ = themeManager;
|
||||
richEditorPattern->overlayMod_ = nullptr;
|
||||
richEditorPattern->InitScrollablePattern();
|
||||
EXPECT_EQ(richEditorPattern->GetScrollBar(), true);
|
||||
}
|
||||
} // namespace OHOS::Ace::NG
|
Loading…
Reference in New Issue
Block a user