From 8a9536f12bb748fbf3c1a938bb582ba30cf84ed5 Mon Sep 17 00:00:00 2001 From: kangshihui Date: Mon, 22 Jul 2024 17:25:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AF=86=E7=A0=81=E4=BF=9D?= =?UTF-8?q?=E9=99=A9=E7=AE=B1=E8=B4=A6=E5=8F=B7=E5=AF=86=E7=A0=81=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E5=90=8E=E6=8B=89=E8=B5=B7=E4=BF=9D=E5=AD=98=E5=AF=86?= =?UTF-8?q?=E7=A0=81=E5=BC=B9=E7=AA=97=EF=BC=8C=E5=86=8D=E6=AC=A1=E8=AE=A4?= =?UTF-8?q?=E8=AF=81=E5=90=8E=EF=BC=8C=E8=B4=A6=E5=8F=B7=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E6=B2=A1=E5=8F=98=E5=8C=96=EF=BC=8C=E4=BD=86=E5=8F=88=E9=87=8D?= =?UTF-8?q?=E6=96=B0=E6=8B=89=E8=B5=B7=E6=9B=B4=E6=96=B0=E8=B4=A6=E5=8F=B7?= =?UTF-8?q?=E5=AF=86=E7=A0=81=E5=BC=B9=E7=AA=97=20Signed-off-by:kangshihui?= =?UTF-8?q??= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I2fdda02eaefb7918850700e69177c3d10a9033e3 --- adapter/ohos/entrance/ace_container.cpp | 2 +- adapter/ohos/entrance/ui_content_impl.cpp | 4 +- adapter/ohos/entrance/ui_content_impl.h | 2 +- .../core/components_ng/base/frame_node.cpp | 4 +- .../core/components_ng/base/frame_node.h | 2 +- .../core/components_ng/base/ui_node.cpp | 7 +- frameworks/core/components_ng/base/ui_node.h | 5 +- .../core/components_ng/pattern/pattern.h | 2 +- .../pattern/text_field/text_field_pattern.cpp | 25 ++-- .../pattern/text_field/text_field_pattern.h | 4 +- .../components_ng/pattern/web/web_pattern.cpp | 2 +- .../components_ng/pattern/web/web_pattern.h | 2 +- .../core/pipeline_ng/pipeline_context.cpp | 4 +- .../core/pipeline_ng/pipeline_context.h | 2 +- .../text_input/text_input_check_test.cpp | 116 +++++++++--------- 15 files changed, 93 insertions(+), 90 deletions(-) diff --git a/adapter/ohos/entrance/ace_container.cpp b/adapter/ohos/entrance/ace_container.cpp index c8e6fbcd0ac..743d1c3e78a 100644 --- a/adapter/ohos/entrance/ace_container.cpp +++ b/adapter/ohos/entrance/ace_container.cpp @@ -1555,7 +1555,7 @@ bool AceContainer::RequestAutoSave(const RefPtr& node, const std: auto uiContentImpl = reinterpret_cast(uiContent); CHECK_NULL_RETURN(uiContentImpl, false); auto viewDataWrap = ViewDataWrap::CreateViewDataWrap(); - uiContentImpl->DumpViewData(node, viewDataWrap); + uiContentImpl->DumpViewData(node, viewDataWrap, false, true); auto pipelineContext = AceType::DynamicCast(pipelineContext_); CHECK_NULL_RETURN(pipelineContext, false); diff --git a/adapter/ohos/entrance/ui_content_impl.cpp b/adapter/ohos/entrance/ui_content_impl.cpp index 9bf9e8eba77..509f2291df2 100644 --- a/adapter/ohos/entrance/ui_content_impl.cpp +++ b/adapter/ohos/entrance/ui_content_impl.cpp @@ -2872,7 +2872,7 @@ bool UIContentImpl::DumpViewData(AbilityBase::ViewData& viewData, AbilityBase::A } bool UIContentImpl::DumpViewData(const RefPtr& node, RefPtr viewDataWrap, - bool skipSubAutoFillContainer) + bool skipSubAutoFillContainer, bool needsRecordData) { CHECK_NULL_RETURN(viewDataWrap, false); auto context = context_.lock(); @@ -2900,7 +2900,7 @@ bool UIContentImpl::DumpViewData(const RefPtr& node, RefPtr(container->GetPipelineContext()); CHECK_NULL_RETURN(pipelineContext, false); - return pipelineContext->DumpPageViewData(node, viewDataWrap, skipSubAutoFillContainer); + return pipelineContext->DumpPageViewData(node, viewDataWrap, skipSubAutoFillContainer, needsRecordData); } void UIContentImpl::SearchElementInfoByAccessibilityId( diff --git a/adapter/ohos/entrance/ui_content_impl.h b/adapter/ohos/entrance/ui_content_impl.h index e89121ff9b2..70e2f0ec8cb 100644 --- a/adapter/ohos/entrance/ui_content_impl.h +++ b/adapter/ohos/entrance/ui_content_impl.h @@ -228,7 +228,7 @@ public: bool DumpViewData(AbilityBase::ViewData& viewData, AbilityBase::AutoFillType& type) override; bool CheckNeedAutoSave() override; bool DumpViewData(const RefPtr& node, RefPtr viewDataWrap, - bool skipSubAutoFillContainer = false); + bool skipSubAutoFillContainer = false, bool needsRecordData = false); void SearchElementInfoByAccessibilityId( int64_t elementId, int32_t mode, diff --git a/frameworks/core/components_ng/base/frame_node.cpp b/frameworks/core/components_ng/base/frame_node.cpp index c4da2c66e72..a7c66f5f27d 100644 --- a/frameworks/core/components_ng/base/frame_node.cpp +++ b/frameworks/core/components_ng/base/frame_node.cpp @@ -883,10 +883,10 @@ void FrameNode::DumpAdvanceInfo() } } -void FrameNode::DumpViewDataPageNode(RefPtr viewDataWrap) +void FrameNode::DumpViewDataPageNode(RefPtr viewDataWrap, bool needsRecordData) { if (pattern_) { - pattern_->DumpViewDataPageNode(viewDataWrap); + pattern_->DumpViewDataPageNode(viewDataWrap, needsRecordData); } } diff --git a/frameworks/core/components_ng/base/frame_node.h b/frameworks/core/components_ng/base/frame_node.h index ee9ec678ae2..17bc6cbb11b 100644 --- a/frameworks/core/components_ng/base/frame_node.h +++ b/frameworks/core/components_ng/base/frame_node.h @@ -1039,7 +1039,7 @@ private: void DumpAlignRulesInfo(); void DumpExtensionHandlerInfo(); void DumpAdvanceInfo() override; - void DumpViewDataPageNode(RefPtr viewDataWrap) override; + void DumpViewDataPageNode(RefPtr viewDataWrap, bool needsRecordData = false) override; void DumpOnSizeChangeInfo(); bool CheckAutoSave() override; void MouseToJsonValue(std::unique_ptr& json, const InspectorFilter& filter) const; diff --git a/frameworks/core/components_ng/base/ui_node.cpp b/frameworks/core/components_ng/base/ui_node.cpp index 8b1eca24cc8..5bbb3bb7ff9 100644 --- a/frameworks/core/components_ng/base/ui_node.cpp +++ b/frameworks/core/components_ng/base/ui_node.cpp @@ -674,13 +674,14 @@ bool UINode::IsAutoFillContainerNode() return tag_ == V2::PAGE_ETS_TAG || tag_ == V2::NAVDESTINATION_VIEW_ETS_TAG; } -void UINode::DumpViewDataPageNodes(RefPtr viewDataWrap, bool skipSubAutoFillContainer) +void UINode::DumpViewDataPageNodes( + RefPtr viewDataWrap, bool skipSubAutoFillContainer, bool needsRecordData) { auto frameNode = AceType::DynamicCast(this); if (frameNode && !frameNode->IsVisible()) { return; } - DumpViewDataPageNode(viewDataWrap); + DumpViewDataPageNode(viewDataWrap, needsRecordData); for (const auto& item : GetChildren()) { if (!item) { continue; @@ -688,7 +689,7 @@ void UINode::DumpViewDataPageNodes(RefPtr viewDataWrap, bool skipS if (skipSubAutoFillContainer && item->IsAutoFillContainerNode()) { continue; } - item->DumpViewDataPageNodes(viewDataWrap, skipSubAutoFillContainer); + item->DumpViewDataPageNodes(viewDataWrap, skipSubAutoFillContainer, needsRecordData); } } diff --git a/frameworks/core/components_ng/base/ui_node.h b/frameworks/core/components_ng/base/ui_node.h index b600792a5d6..bf9b6bf7a24 100644 --- a/frameworks/core/components_ng/base/ui_node.h +++ b/frameworks/core/components_ng/base/ui_node.h @@ -189,7 +189,8 @@ public: virtual void AdjustLayoutWrapperTree(const RefPtr& parent, bool forceMeasure, bool forceLayout); bool IsAutoFillContainerNode(); - void DumpViewDataPageNodes(RefPtr viewDataWrap, bool skipSubAutoFillContainer = false); + void DumpViewDataPageNodes( + RefPtr viewDataWrap, bool skipSubAutoFillContainer = false, bool needsRecordData = false); bool NeedRequestAutoSave(); // DFX info. void DumpTree(int32_t depth); @@ -771,7 +772,7 @@ protected: // dump self info. virtual void DumpInfo() {} virtual void DumpAdvanceInfo() {} - virtual void DumpViewDataPageNode(RefPtr viewDataWrap) {} + virtual void DumpViewDataPageNode(RefPtr viewDataWrap, bool needsRecordData = false) {} virtual bool CheckAutoSave() { return false; diff --git a/frameworks/core/components_ng/pattern/pattern.h b/frameworks/core/components_ng/pattern/pattern.h index c58942f70a6..99abecb71a9 100644 --- a/frameworks/core/components_ng/pattern/pattern.h +++ b/frameworks/core/components_ng/pattern/pattern.h @@ -379,7 +379,7 @@ public: virtual void DumpInfo() {} virtual void DumpAdvanceInfo() {} - virtual void DumpViewDataPageNode(RefPtr viewDataWrap) {} + virtual void DumpViewDataPageNode(RefPtr viewDataWrap, bool needsRecordData = false) {} virtual void NotifyFillRequestSuccess(RefPtr viewDataWrap, RefPtr nodeWrap, AceAutoFillType autoFillType) {} virtual void NotifyFillRequestFailed(int32_t errCode, const std::string& fillContent = "", bool isPopup = false) {} diff --git a/frameworks/core/components_ng/pattern/text_field/text_field_pattern.cpp b/frameworks/core/components_ng/pattern/text_field/text_field_pattern.cpp index 2945ec08e0a..99facf26fe5 100644 --- a/frameworks/core/components_ng/pattern/text_field/text_field_pattern.cpp +++ b/frameworks/core/components_ng/pattern/text_field/text_field_pattern.cpp @@ -6534,7 +6534,7 @@ void TextFieldPattern::DumpAdvanceInfo() DumpLog::GetInstance().AddDesc(std::string("fontWeightScale: ").append(std::to_string(fontWeightScale))); } -void TextFieldPattern::DumpViewDataPageNode(RefPtr viewDataWrap) +void TextFieldPattern::DumpViewDataPageNode(RefPtr viewDataWrap, bool needsRecordData) { CHECK_NULL_VOID(viewDataWrap); auto host = GetHost(); @@ -6555,6 +6555,9 @@ void TextFieldPattern::DumpViewDataPageNode(RefPtr viewDataWrap) } else { info->SetValue(contentController_->GetTextValue()); } + if (needsRecordData) { + lastAutoFillTextValue_ = contentController_->GetTextValue(); + } info->SetPlaceholder(GetPlaceHolder()); info->SetPasswordRules(layoutProperty->GetPasswordRulesValue("")); info->SetEnableAutoFill(layoutProperty->GetEnableAutoFillValue(true)); @@ -6587,6 +6590,13 @@ void TextFieldPattern::NotifyFillRequestSuccess(RefPtr viewDataWra focusHub->RequestFocusImmediately(); DoProcessAutoFill(); } + auto type = GetAutoFillType(); + bool formOtherAccount = (viewDataWrap->GetOtherAccount() && IsAutoFillPasswordType(type)); + if (!(type == AceAutoFillType::ACE_NEW_PASSWORD && type == autoFillType) && !formOtherAccount) { + TAG_LOGI(AceLogTag::ACE_AUTO_FILL, "Set last auto fill text value."); + lastAutoFillTextValue_ = nodeWrap->GetValue(); + } + if (!contentController_ || contentController_->GetTextValue() == nodeWrap->GetValue()) { return; } @@ -6595,14 +6605,6 @@ void TextFieldPattern::NotifyFillRequestSuccess(RefPtr viewDataWra selectController_->UpdateCaretIndex(textLength); NotifyOnEditChanged(true); host->MarkDirtyNode(PROPERTY_UPDATE_MEASURE); - auto layoutProperty = host->GetLayoutProperty(); - CHECK_NULL_VOID(layoutProperty); - auto type = GetAutoFillType(); - bool formOtherAccount = (viewDataWrap->GetOtherAccount() && IsAutoFillPasswordType(type)); - if (!(type == AceAutoFillType::ACE_NEW_PASSWORD && type == autoFillType) && !formOtherAccount) { - TAG_LOGI(AceLogTag::ACE_AUTO_FILL, "Set last auto fill text value."); - lastAutoFillPasswordTextValue_ = nodeWrap->GetValue(); - } } bool TextFieldPattern::ParseFillContentJsonValue(const std::unique_ptr& jsonObject, @@ -6670,14 +6672,13 @@ bool TextFieldPattern::CheckAutoSave() } auto autoFillType = GetAutoFillType(); if (autoFillType == AceAutoFillType::ACE_USER_NAME) { - if (!lastAutoFillPasswordTextValue_.empty() && - contentController_->GetTextValue() != lastAutoFillPasswordTextValue_) { + if (!lastAutoFillTextValue_.empty() && contentController_->GetTextValue() != lastAutoFillTextValue_) { return true; } } if (AceAutoFillType::ACE_UNSPECIFIED < autoFillType && autoFillType <= AceAutoFillType::ACE_FORMAT_ADDRESS && autoFillType != AceAutoFillType::ACE_USER_NAME) { - if (contentController_->GetTextValue() != lastAutoFillPasswordTextValue_) { + if (contentController_->GetTextValue() != lastAutoFillTextValue_) { return true; } } diff --git a/frameworks/core/components_ng/pattern/text_field/text_field_pattern.h b/frameworks/core/components_ng/pattern/text_field/text_field_pattern.h index 9b1fe271f29..a3321c361e1 100644 --- a/frameworks/core/components_ng/pattern/text_field/text_field_pattern.h +++ b/frameworks/core/components_ng/pattern/text_field/text_field_pattern.h @@ -1094,7 +1094,7 @@ public: void DumpInfo() override; void DumpAdvanceInfo() override; - void DumpViewDataPageNode(RefPtr viewDataWrap) override; + void DumpViewDataPageNode(RefPtr viewDataWrap, bool needsRecordData = false) override; void NotifyFillRequestSuccess(RefPtr viewDataWrap, RefPtr nodeWrap, AceAutoFillType autoFillType) override; void NotifyFillRequestFailed(int32_t errCode, const std::string& fillContent = "", bool isPopup = false) override; @@ -1748,7 +1748,7 @@ private: RefPtr unitNode_; RefPtr responseArea_; RefPtr cleanNodeResponseArea_; - std::string lastAutoFillPasswordTextValue_; + std::string lastAutoFillTextValue_; bool isSupportCameraInput_ = false; std::function processOverlayDelayTask_; std::function isFocusActiveUpdateEvent_; diff --git a/frameworks/core/components_ng/pattern/web/web_pattern.cpp b/frameworks/core/components_ng/pattern/web/web_pattern.cpp index 830448f9d51..14614b2cc0e 100644 --- a/frameworks/core/components_ng/pattern/web/web_pattern.cpp +++ b/frameworks/core/components_ng/pattern/web/web_pattern.cpp @@ -3309,7 +3309,7 @@ void WebPattern::OnQuickMenuDismissed() CloseSelectOverlay(); } -void WebPattern::DumpViewDataPageNode(RefPtr viewDataWrap) +void WebPattern::DumpViewDataPageNode(RefPtr viewDataWrap, bool needsRecordData) { TAG_LOGI(AceLogTag::ACE_WEB, "called"); CHECK_NULL_VOID(viewDataWrap); diff --git a/frameworks/core/components_ng/pattern/web/web_pattern.h b/frameworks/core/components_ng/pattern/web/web_pattern.h index b2defb1867e..74db8484f0c 100644 --- a/frameworks/core/components_ng/pattern/web/web_pattern.h +++ b/frameworks/core/components_ng/pattern/web/web_pattern.h @@ -190,7 +190,7 @@ public: void OnModifyDone() override; - void DumpViewDataPageNode(RefPtr viewDataWrap) override; + void DumpViewDataPageNode(RefPtr viewDataWrap, bool needsRecordData = false) override; void NotifyFillRequestSuccess(RefPtr viewDataWrap, RefPtr nodeWrap, AceAutoFillType autoFillType) override; diff --git a/frameworks/core/pipeline_ng/pipeline_context.cpp b/frameworks/core/pipeline_ng/pipeline_context.cpp index 0ffc699d71a..4140485c8e4 100644 --- a/frameworks/core/pipeline_ng/pipeline_context.cpp +++ b/frameworks/core/pipeline_ng/pipeline_context.cpp @@ -2257,7 +2257,7 @@ void PipelineContext::RegisterDumpInfoListener(const std::function& node, RefPtr viewDataWrap, - bool skipSubAutoFillContainer) + bool skipSubAutoFillContainer, bool needsRecordData) { CHECK_NULL_RETURN(viewDataWrap, false); RefPtr pageNode = nullptr; @@ -2273,7 +2273,7 @@ bool PipelineContext::DumpPageViewData(const RefPtr& node, RefPtrDumpViewDataPageNodes(viewDataWrap, skipSubAutoFillContainer); + dumpNode->DumpViewDataPageNodes(viewDataWrap, skipSubAutoFillContainer, needsRecordData); auto pagePattern = pageNode->GetPattern(); CHECK_NULL_RETURN(pagePattern, false); auto pageInfo = pagePattern->GetPageInfo(); diff --git a/frameworks/core/pipeline_ng/pipeline_context.h b/frameworks/core/pipeline_ng/pipeline_context.h index ad121e44e90..ad8b14fa2bc 100644 --- a/frameworks/core/pipeline_ng/pipeline_context.h +++ b/frameworks/core/pipeline_ng/pipeline_context.h @@ -577,7 +577,7 @@ public: void DumpJsInfo(const std::vector& params) const; bool DumpPageViewData(const RefPtr& node, RefPtr viewDataWrap, - bool skipSubAutoFillContainer = false); + bool skipSubAutoFillContainer = false, bool needsRecordData = false); bool CheckNeedAutoSave(); bool CheckPageFocus(); bool CheckOverlayFocus(); diff --git a/test/unittest/core/pattern/text_input/text_input_check_test.cpp b/test/unittest/core/pattern/text_input/text_input_check_test.cpp index 9351aec37cc..7daf523ba04 100644 --- a/test/unittest/core/pattern/text_input/text_input_check_test.cpp +++ b/test/unittest/core/pattern/text_input/text_input_check_test.cpp @@ -118,7 +118,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave004, TestSize.Level1) * @tc.steps: step3. set PasswordTextValue eq textValue and call CheckAutoSave. * @tc.expected: return true */ - pattern_->lastAutoFillPasswordTextValue_ = "a"; + pattern_->lastAutoFillTextValue_ = "a"; EXPECT_TRUE(pattern_->CheckAutoSave()); FlushLayoutTask(frameNode_); GetFocus(); @@ -127,7 +127,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave004, TestSize.Level1) * @tc.steps: step4. set PasswordTextValue ne textValue and call CheckAutoSave. * @tc.expected: return false */ - pattern_->lastAutoFillPasswordTextValue_ = "abcdefghijklmnopqrstuvwxyz"; + pattern_->lastAutoFillTextValue_ = "abcdefghijklmnopqrstuvwxyz"; EXPECT_FALSE(pattern_->CheckAutoSave()); } @@ -151,7 +151,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave005, TestSize.Level1) * @tc.steps: step2. call CheckAutoSave. * @tc.expected: return false */ - pattern_->lastAutoFillPasswordTextValue_ = "a"; + pattern_->lastAutoFillTextValue_ = "a"; EXPECT_TRUE(pattern_->CheckAutoSave()); FlushLayoutTask(frameNode_); GetFocus(); @@ -160,7 +160,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave005, TestSize.Level1) * @tc.steps: step3. set PasswordTextValue eq textValue and call CheckAutoSave. * @tc.expected: return true */ - pattern_->lastAutoFillPasswordTextValue_ = "abcdefghijklmnopqrstuvwxyz"; + pattern_->lastAutoFillTextValue_ = "abcdefghijklmnopqrstuvwxyz"; EXPECT_FALSE(pattern_->CheckAutoSave()); } @@ -184,7 +184,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave006, TestSize.Level1) * @tc.steps: step2. call CheckAutoSave. * @tc.expected: return false */ - pattern_->lastAutoFillPasswordTextValue_ = "a"; + pattern_->lastAutoFillTextValue_ = "a"; EXPECT_TRUE(pattern_->CheckAutoSave()); FlushLayoutTask(frameNode_); GetFocus(); @@ -193,7 +193,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave006, TestSize.Level1) * @tc.steps: step3. set PasswordTextValue eq textValue and call CheckAutoSave. * @tc.expected: return true */ - pattern_->lastAutoFillPasswordTextValue_ = "abcdefghijklmnopqrstuvwxyz"; + pattern_->lastAutoFillTextValue_ = "abcdefghijklmnopqrstuvwxyz"; EXPECT_FALSE(pattern_->CheckAutoSave()); } @@ -217,7 +217,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave007, TestSize.Level1) * @tc.steps: step2. call CheckAutoSave. * @tc.expected: return true */ - pattern_->lastAutoFillPasswordTextValue_ = "a"; + pattern_->lastAutoFillTextValue_ = "a"; EXPECT_TRUE(pattern_->CheckAutoSave()); FlushLayoutTask(frameNode_); GetFocus(); @@ -226,7 +226,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave007, TestSize.Level1) * @tc.steps: step3. set PasswordTextValue eq textValue and call CheckAutoSave. * @tc.expected: return false */ - pattern_->lastAutoFillPasswordTextValue_ = "abcdefghijklmnopqrstuvwxyz"; + pattern_->lastAutoFillTextValue_ = "abcdefghijklmnopqrstuvwxyz"; EXPECT_FALSE(pattern_->CheckAutoSave()); } @@ -250,7 +250,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave008, TestSize.Level1) * @tc.steps: step2. call CheckAutoSave. * @tc.expected: return true */ - pattern_->lastAutoFillPasswordTextValue_ = "a"; + pattern_->lastAutoFillTextValue_ = "a"; EXPECT_TRUE(pattern_->CheckAutoSave()); FlushLayoutTask(frameNode_); GetFocus(); @@ -259,7 +259,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave008, TestSize.Level1) * @tc.steps: step3. set PasswordTextValue eq textValue and call CheckAutoSave. * @tc.expected: return false */ - pattern_->lastAutoFillPasswordTextValue_ = "abcdefghijklmnopqrstuvwxyz"; + pattern_->lastAutoFillTextValue_ = "abcdefghijklmnopqrstuvwxyz"; EXPECT_FALSE(pattern_->CheckAutoSave()); } @@ -283,7 +283,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave009, TestSize.Level1) * @tc.steps: step2. call CheckAutoSave. * @tc.expected: return true */ - pattern_->lastAutoFillPasswordTextValue_ = "a"; + pattern_->lastAutoFillTextValue_ = "a"; EXPECT_TRUE(pattern_->CheckAutoSave()); FlushLayoutTask(frameNode_); GetFocus(); @@ -292,7 +292,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave009, TestSize.Level1) * @tc.steps: step3. set PasswordTextValue eq textValue and call CheckAutoSave. * @tc.expected: return false */ - pattern_->lastAutoFillPasswordTextValue_ = "abcdefghijklmnopqrstuvwxyz"; + pattern_->lastAutoFillTextValue_ = "abcdefghijklmnopqrstuvwxyz"; EXPECT_FALSE(pattern_->CheckAutoSave()); } @@ -316,7 +316,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0010, TestSize.Level1) * @tc.steps: step2. call CheckAutoSave. * @tc.expected: return true */ - pattern_->lastAutoFillPasswordTextValue_ = "a"; + pattern_->lastAutoFillTextValue_ = "a"; EXPECT_TRUE(pattern_->CheckAutoSave()); FlushLayoutTask(frameNode_); GetFocus(); @@ -325,7 +325,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0010, TestSize.Level1) * @tc.steps: step3. set PasswordTextValue eq textValue and call CheckAutoSave. * @tc.expected: return false */ - pattern_->lastAutoFillPasswordTextValue_ = "abcdefghijklmnopqrstuvwxyz"; + pattern_->lastAutoFillTextValue_ = "abcdefghijklmnopqrstuvwxyz"; EXPECT_FALSE(pattern_->CheckAutoSave()); } @@ -349,7 +349,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0011, TestSize.Level1) * @tc.steps: step2. call CheckAutoSave. * @tc.expected: return true */ - pattern_->lastAutoFillPasswordTextValue_ = "a"; + pattern_->lastAutoFillTextValue_ = "a"; EXPECT_TRUE(pattern_->CheckAutoSave()); FlushLayoutTask(frameNode_); GetFocus(); @@ -358,7 +358,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0011, TestSize.Level1) * @tc.steps: step3. set PasswordTextValue eq textValue and call CheckAutoSave. * @tc.expected: return false */ - pattern_->lastAutoFillPasswordTextValue_ = "abcdefghijklmnopqrstuvwxyz"; + pattern_->lastAutoFillTextValue_ = "abcdefghijklmnopqrstuvwxyz"; EXPECT_FALSE(pattern_->CheckAutoSave()); } @@ -382,7 +382,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0012, TestSize.Level1) * @tc.steps: step2. call CheckAutoSave. * @tc.expected: return true */ - pattern_->lastAutoFillPasswordTextValue_ = "a"; + pattern_->lastAutoFillTextValue_ = "a"; EXPECT_TRUE(pattern_->CheckAutoSave()); FlushLayoutTask(frameNode_); GetFocus(); @@ -391,7 +391,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0012, TestSize.Level1) * @tc.steps: step3. set PasswordTextValue eq textValue and call CheckAutoSave. * @tc.expected: return false */ - pattern_->lastAutoFillPasswordTextValue_ = "abcdefghijklmnopqrstuvwxyz"; + pattern_->lastAutoFillTextValue_ = "abcdefghijklmnopqrstuvwxyz"; EXPECT_FALSE(pattern_->CheckAutoSave()); } @@ -415,7 +415,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0013, TestSize.Level1) * @tc.steps: step2. call CheckAutoSave. * @tc.expected: return true */ - pattern_->lastAutoFillPasswordTextValue_ = "a"; + pattern_->lastAutoFillTextValue_ = "a"; EXPECT_TRUE(pattern_->CheckAutoSave()); FlushLayoutTask(frameNode_); GetFocus(); @@ -424,7 +424,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0013, TestSize.Level1) * @tc.steps: step3. set PasswordTextValue eq textValue and call CheckAutoSave. * @tc.expected: return false */ - pattern_->lastAutoFillPasswordTextValue_ = "abcdefghijklmnopqrstuvwxyz"; + pattern_->lastAutoFillTextValue_ = "abcdefghijklmnopqrstuvwxyz"; EXPECT_FALSE(pattern_->CheckAutoSave()); } @@ -448,7 +448,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0014, TestSize.Level1) * @tc.steps: step2. call CheckAutoSave. * @tc.expected: return true */ - pattern_->lastAutoFillPasswordTextValue_ = "a"; + pattern_->lastAutoFillTextValue_ = "a"; EXPECT_TRUE(pattern_->CheckAutoSave()); FlushLayoutTask(frameNode_); GetFocus(); @@ -457,7 +457,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0014, TestSize.Level1) * @tc.steps: step3. set PasswordTextValue eq textValue and call CheckAutoSave. * @tc.expected: return false */ - pattern_->lastAutoFillPasswordTextValue_ = "abcdefghijklmnopqrstuvwxyz"; + pattern_->lastAutoFillTextValue_ = "abcdefghijklmnopqrstuvwxyz"; EXPECT_FALSE(pattern_->CheckAutoSave()); } @@ -481,7 +481,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0015, TestSize.Level1) * @tc.steps: step2. call CheckAutoSave. * @tc.expected: return true */ - pattern_->lastAutoFillPasswordTextValue_ = "a"; + pattern_->lastAutoFillTextValue_ = "a"; EXPECT_TRUE(pattern_->CheckAutoSave()); FlushLayoutTask(frameNode_); GetFocus(); @@ -490,7 +490,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0015, TestSize.Level1) * @tc.steps: step3. set PasswordTextValue eq textValue and call CheckAutoSave. * @tc.expected: return false */ - pattern_->lastAutoFillPasswordTextValue_ = "abcdefghijklmnopqrstuvwxyz"; + pattern_->lastAutoFillTextValue_ = "abcdefghijklmnopqrstuvwxyz"; EXPECT_FALSE(pattern_->CheckAutoSave()); } @@ -514,7 +514,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0016, TestSize.Level1) * @tc.steps: step2. call CheckAutoSave. * @tc.expected: return true */ - pattern_->lastAutoFillPasswordTextValue_ = "a"; + pattern_->lastAutoFillTextValue_ = "a"; EXPECT_TRUE(pattern_->CheckAutoSave()); FlushLayoutTask(frameNode_); GetFocus(); @@ -523,7 +523,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0016, TestSize.Level1) * @tc.steps: step3. set PasswordTextValue eq textValue and call CheckAutoSave. * @tc.expected: return false */ - pattern_->lastAutoFillPasswordTextValue_ = "abcdefghijklmnopqrstuvwxyz"; + pattern_->lastAutoFillTextValue_ = "abcdefghijklmnopqrstuvwxyz"; EXPECT_FALSE(pattern_->CheckAutoSave()); } @@ -547,7 +547,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0017, TestSize.Level1) * @tc.steps: step2. call CheckAutoSave. * @tc.expected: return true */ - pattern_->lastAutoFillPasswordTextValue_ = "a"; + pattern_->lastAutoFillTextValue_ = "a"; EXPECT_TRUE(pattern_->CheckAutoSave()); FlushLayoutTask(frameNode_); GetFocus(); @@ -556,7 +556,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0017, TestSize.Level1) * @tc.steps: step3. set PasswordTextValue eq textValue and call CheckAutoSave. * @tc.expected: return false */ - pattern_->lastAutoFillPasswordTextValue_ = "abcdefghijklmnopqrstuvwxyz"; + pattern_->lastAutoFillTextValue_ = "abcdefghijklmnopqrstuvwxyz"; EXPECT_FALSE(pattern_->CheckAutoSave()); } @@ -580,7 +580,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0018, TestSize.Level1) * @tc.steps: step2. call CheckAutoSave. * @tc.expected: return true */ - pattern_->lastAutoFillPasswordTextValue_ = "a"; + pattern_->lastAutoFillTextValue_ = "a"; EXPECT_TRUE(pattern_->CheckAutoSave()); FlushLayoutTask(frameNode_); GetFocus(); @@ -589,7 +589,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0018, TestSize.Level1) * @tc.steps: step3. set PasswordTextValue eq textValue and call CheckAutoSave. * @tc.expected: return false */ - pattern_->lastAutoFillPasswordTextValue_ = "abcdefghijklmnopqrstuvwxyz"; + pattern_->lastAutoFillTextValue_ = "abcdefghijklmnopqrstuvwxyz"; EXPECT_FALSE(pattern_->CheckAutoSave()); } @@ -613,7 +613,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0019, TestSize.Level1) * @tc.steps: step2. call CheckAutoSave. * @tc.expected: return true */ - pattern_->lastAutoFillPasswordTextValue_ = "a"; + pattern_->lastAutoFillTextValue_ = "a"; EXPECT_TRUE(pattern_->CheckAutoSave()); FlushLayoutTask(frameNode_); GetFocus(); @@ -622,7 +622,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0019, TestSize.Level1) * @tc.steps: step3. set PasswordTextValue eq textValue and call CheckAutoSave. * @tc.expected: return false */ - pattern_->lastAutoFillPasswordTextValue_ = "abcdefghijklmnopqrstuvwxyz"; + pattern_->lastAutoFillTextValue_ = "abcdefghijklmnopqrstuvwxyz"; EXPECT_FALSE(pattern_->CheckAutoSave()); } @@ -646,7 +646,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0020, TestSize.Level1) * @tc.steps: step2. call CheckAutoSave. * @tc.expected: return true */ - pattern_->lastAutoFillPasswordTextValue_ = "a"; + pattern_->lastAutoFillTextValue_ = "a"; EXPECT_TRUE(pattern_->CheckAutoSave()); FlushLayoutTask(frameNode_); GetFocus(); @@ -655,7 +655,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0020, TestSize.Level1) * @tc.steps: step3. set PasswordTextValue eq textValue and call CheckAutoSave. * @tc.expected: return false */ - pattern_->lastAutoFillPasswordTextValue_ = "abcdefghijklmnopqrstuvwxyz"; + pattern_->lastAutoFillTextValue_ = "abcdefghijklmnopqrstuvwxyz"; EXPECT_FALSE(pattern_->CheckAutoSave()); } @@ -679,7 +679,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0021, TestSize.Level1) * @tc.steps: step2. call CheckAutoSave. * @tc.expected: return true */ - pattern_->lastAutoFillPasswordTextValue_ = "a"; + pattern_->lastAutoFillTextValue_ = "a"; EXPECT_TRUE(pattern_->CheckAutoSave()); FlushLayoutTask(frameNode_); GetFocus(); @@ -688,7 +688,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0021, TestSize.Level1) * @tc.steps: step3. set PasswordTextValue eq textValue and call CheckAutoSave. * @tc.expected: return false */ - pattern_->lastAutoFillPasswordTextValue_ = "abcdefghijklmnopqrstuvwxyz"; + pattern_->lastAutoFillTextValue_ = "abcdefghijklmnopqrstuvwxyz"; EXPECT_FALSE(pattern_->CheckAutoSave()); } @@ -712,7 +712,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0022, TestSize.Level1) * @tc.steps: step2. call CheckAutoSave. * @tc.expected: return true */ - pattern_->lastAutoFillPasswordTextValue_ = "a"; + pattern_->lastAutoFillTextValue_ = "a"; EXPECT_TRUE(pattern_->CheckAutoSave()); FlushLayoutTask(frameNode_); GetFocus(); @@ -721,7 +721,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0022, TestSize.Level1) * @tc.steps: step3. set PasswordTextValue eq textValue and call CheckAutoSave. * @tc.expected: return false */ - pattern_->lastAutoFillPasswordTextValue_ = "abcdefghijklmnopqrstuvwxyz"; + pattern_->lastAutoFillTextValue_ = "abcdefghijklmnopqrstuvwxyz"; EXPECT_FALSE(pattern_->CheckAutoSave()); } @@ -745,7 +745,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0023, TestSize.Level1) * @tc.steps: step2. call CheckAutoSave. * @tc.expected: return true */ - pattern_->lastAutoFillPasswordTextValue_ = "a"; + pattern_->lastAutoFillTextValue_ = "a"; EXPECT_TRUE(pattern_->CheckAutoSave()); FlushLayoutTask(frameNode_); GetFocus(); @@ -754,7 +754,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0023, TestSize.Level1) * @tc.steps: step3. set PasswordTextValue eq textValue and call CheckAutoSave. * @tc.expected: return false */ - pattern_->lastAutoFillPasswordTextValue_ = "abcdefghijklmnopqrstuvwxyz"; + pattern_->lastAutoFillTextValue_ = "abcdefghijklmnopqrstuvwxyz"; EXPECT_FALSE(pattern_->CheckAutoSave()); } @@ -778,7 +778,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0024, TestSize.Level1) * @tc.steps: step2. call CheckAutoSave. * @tc.expected: return true */ - pattern_->lastAutoFillPasswordTextValue_ = "a"; + pattern_->lastAutoFillTextValue_ = "a"; EXPECT_TRUE(pattern_->CheckAutoSave()); FlushLayoutTask(frameNode_); GetFocus(); @@ -787,7 +787,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0024, TestSize.Level1) * @tc.steps: step3. set PasswordTextValue eq textValue and call CheckAutoSave. * @tc.expected: return false */ - pattern_->lastAutoFillPasswordTextValue_ = "abcdefghijklmnopqrstuvwxyz"; + pattern_->lastAutoFillTextValue_ = "abcdefghijklmnopqrstuvwxyz"; EXPECT_FALSE(pattern_->CheckAutoSave()); } @@ -811,7 +811,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0025, TestSize.Level1) * @tc.steps: step2. call CheckAutoSave. * @tc.expected: return true */ - pattern_->lastAutoFillPasswordTextValue_ = "a"; + pattern_->lastAutoFillTextValue_ = "a"; EXPECT_TRUE(pattern_->CheckAutoSave()); FlushLayoutTask(frameNode_); GetFocus(); @@ -820,7 +820,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0025, TestSize.Level1) * @tc.steps: step3. set PasswordTextValue eq textValue and call CheckAutoSave. * @tc.expected: return false */ - pattern_->lastAutoFillPasswordTextValue_ = "abcdefghijklmnopqrstuvwxyz"; + pattern_->lastAutoFillTextValue_ = "abcdefghijklmnopqrstuvwxyz"; EXPECT_FALSE(pattern_->CheckAutoSave()); } @@ -844,7 +844,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0026, TestSize.Level1) * @tc.steps: step2. call CheckAutoSave. * @tc.expected: return true */ - pattern_->lastAutoFillPasswordTextValue_ = "a"; + pattern_->lastAutoFillTextValue_ = "a"; EXPECT_TRUE(pattern_->CheckAutoSave()); FlushLayoutTask(frameNode_); GetFocus(); @@ -853,7 +853,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0026, TestSize.Level1) * @tc.steps: step3. set PasswordTextValue eq textValue and call CheckAutoSave. * @tc.expected: return false */ - pattern_->lastAutoFillPasswordTextValue_ = "abcdefghijklmnopqrstuvwxyz"; + pattern_->lastAutoFillTextValue_ = "abcdefghijklmnopqrstuvwxyz"; EXPECT_FALSE(pattern_->CheckAutoSave()); } @@ -877,7 +877,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0027, TestSize.Level1) * @tc.steps: step2. call CheckAutoSave. * @tc.expected: return true */ - pattern_->lastAutoFillPasswordTextValue_ = "a"; + pattern_->lastAutoFillTextValue_ = "a"; EXPECT_TRUE(pattern_->CheckAutoSave()); FlushLayoutTask(frameNode_); GetFocus(); @@ -886,7 +886,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0027, TestSize.Level1) * @tc.steps: step3. set PasswordTextValue eq textValue and call CheckAutoSave. * @tc.expected: return false */ - pattern_->lastAutoFillPasswordTextValue_ = "abcdefghijklmnopqrstuvwxyz"; + pattern_->lastAutoFillTextValue_ = "abcdefghijklmnopqrstuvwxyz"; EXPECT_FALSE(pattern_->CheckAutoSave()); } @@ -910,7 +910,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0028, TestSize.Level1) * @tc.steps: step2. call CheckAutoSave. * @tc.expected: return true */ - pattern_->lastAutoFillPasswordTextValue_ = "a"; + pattern_->lastAutoFillTextValue_ = "a"; EXPECT_TRUE(pattern_->CheckAutoSave()); FlushLayoutTask(frameNode_); GetFocus(); @@ -919,7 +919,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0028, TestSize.Level1) * @tc.steps: step3. set PasswordTextValue eq textValue and call CheckAutoSave. * @tc.expected: return false */ - pattern_->lastAutoFillPasswordTextValue_ = "abcdefghijklmnopqrstuvwxyz"; + pattern_->lastAutoFillTextValue_ = "abcdefghijklmnopqrstuvwxyz"; EXPECT_FALSE(pattern_->CheckAutoSave()); } @@ -943,7 +943,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0029, TestSize.Level1) * @tc.steps: step2. call CheckAutoSave. * @tc.expected: return true */ - pattern_->lastAutoFillPasswordTextValue_ = "a"; + pattern_->lastAutoFillTextValue_ = "a"; EXPECT_TRUE(pattern_->CheckAutoSave()); FlushLayoutTask(frameNode_); GetFocus(); @@ -952,7 +952,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0029, TestSize.Level1) * @tc.steps: step3. set PasswordTextValue eq textValue and call CheckAutoSave. * @tc.expected: return false */ - pattern_->lastAutoFillPasswordTextValue_ = "abcdefghijklmnopqrstuvwxyz"; + pattern_->lastAutoFillTextValue_ = "abcdefghijklmnopqrstuvwxyz"; EXPECT_FALSE(pattern_->CheckAutoSave()); } @@ -976,7 +976,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0030, TestSize.Level1) * @tc.steps: step2. call CheckAutoSave. * @tc.expected: return true */ - pattern_->lastAutoFillPasswordTextValue_ = "a"; + pattern_->lastAutoFillTextValue_ = "a"; EXPECT_TRUE(pattern_->CheckAutoSave()); FlushLayoutTask(frameNode_); GetFocus(); @@ -985,7 +985,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0030, TestSize.Level1) * @tc.steps: step3. set PasswordTextValue eq textValue and call CheckAutoSave. * @tc.expected: return false */ - pattern_->lastAutoFillPasswordTextValue_ = "abcdefghijklmnopqrstuvwxyz"; + pattern_->lastAutoFillTextValue_ = "abcdefghijklmnopqrstuvwxyz"; EXPECT_FALSE(pattern_->CheckAutoSave()); } @@ -1009,7 +1009,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0031, TestSize.Level1) * @tc.steps: step2. call CheckAutoSave. * @tc.expected: return true */ - pattern_->lastAutoFillPasswordTextValue_ = "a"; + pattern_->lastAutoFillTextValue_ = "a"; EXPECT_TRUE(pattern_->CheckAutoSave()); FlushLayoutTask(frameNode_); GetFocus(); @@ -1018,7 +1018,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0031, TestSize.Level1) * @tc.steps: step3. set PasswordTextValue eq textValue and call CheckAutoSave. * @tc.expected: return false */ - pattern_->lastAutoFillPasswordTextValue_ = "abcdefghijklmnopqrstuvwxyz"; + pattern_->lastAutoFillTextValue_ = "abcdefghijklmnopqrstuvwxyz"; EXPECT_FALSE(pattern_->CheckAutoSave()); } @@ -1042,7 +1042,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0032, TestSize.Level1) * @tc.steps: step2. call CheckAutoSave. * @tc.expected: return true */ - pattern_->lastAutoFillPasswordTextValue_ = "a"; + pattern_->lastAutoFillTextValue_ = "a"; EXPECT_TRUE(pattern_->CheckAutoSave()); FlushLayoutTask(frameNode_); GetFocus(); @@ -1051,7 +1051,7 @@ HWTEST_F(TextInputCheckTest, CheckAutoSave0032, TestSize.Level1) * @tc.steps: step3. set PasswordTextValue eq textValue and call CheckAutoSave. * @tc.expected: return false */ - pattern_->lastAutoFillPasswordTextValue_ = "abcdefghijklmnopqrstuvwxyz"; + pattern_->lastAutoFillTextValue_ = "abcdefghijklmnopqrstuvwxyz"; EXPECT_FALSE(pattern_->CheckAutoSave()); }