Commit 87363802 authored by John Z Wu's avatar John Z Wu Committed by Commit Bot

Expose has_password_field in form_structure.h

Clients of //ios/web_view would like to understand if a form has a
password field in it to distinguish it from other forms.

Bug: 905546
Change-Id: I875454eec0339deab63c5fb520ab37aeb6f1fe3c
Reviewed-on: https://chromium-review.googlesource.com/c/1341245Reviewed-by: default avatarVaclav Brozek <vabr@chromium.org>
Commit-Queue: John Wu <jzw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609155}
parent 36cbe46f
......@@ -239,6 +239,8 @@ class FormStructure {
return has_author_specified_upi_vpa_hint_;
}
bool has_password_field() const { return has_password_field_; }
void set_submission_event(
PasswordForm::SubmissionIndicatorEvent submission_event) {
submission_event_ = submission_event;
......
......@@ -1291,6 +1291,7 @@ TEST_F(FormStructureTest, PasswordFormShouldBeQueried) {
FormStructure form_structure(form);
form_structure.DetermineHeuristicTypes();
EXPECT_TRUE(form_structure.has_password_field());
EXPECT_TRUE(form_structure.ShouldBeQueried());
EXPECT_TRUE(form_structure.ShouldBeUploaded());
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment