Commit 79d2b192 authored by John Z Wu's avatar John Z Wu Committed by Commit Bot

Update isPasswordSuggestion to match style.

Actually made it into a method instead since I felt asking a
CWVAutofillSuggestion for its property passwordSuggestion is kind of
confusing. As a method I think it's more clear.

Change-Id: I3eb32cfff01236f099dcda720a812bdaa0f78c20
Reviewed-on: https://chromium-review.googlesource.com/c/1347101
Commit-Queue: John Wu <jzw@chromium.org>
Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610204}
parent 98264727
......@@ -14,13 +14,14 @@
#error "This file requires ARC support."
#endif
@implementation CWVAutofillSuggestion
@implementation CWVAutofillSuggestion {
BOOL _isPasswordSuggestion;
}
@synthesize formSuggestion = _formSuggestion;
@synthesize formName = _formName;
@synthesize fieldIdentifier = _fieldIdentifier;
@synthesize frameID = _frameID;
@synthesize isPasswordSuggestion = _isPasswordSuggestion;
- (instancetype)initWithFormSuggestion:(FormSuggestion*)formSuggestion
formName:(NSString*)formName
......@@ -59,6 +60,10 @@
.ToUIImage();
}
- (BOOL)isPasswordSuggestion {
return _isPasswordSuggestion;
}
#pragma mark - NSObject
- (NSString*)debugDescription {
......
......@@ -41,7 +41,7 @@ TEST_F(CWVAutofillSuggestionTest, Initialization) {
EXPECT_NSEQ(formSuggestion.displayDescription, suggestion.displayDescription);
EXPECT_NSEQ(formSuggestion.value, suggestion.value);
EXPECT_EQ(formSuggestion, suggestion.formSuggestion);
EXPECT_FALSE(suggestion.isPasswordSuggestion);
EXPECT_FALSE([suggestion isPasswordSuggestion]);
}
} // namespace ios_web_view
......@@ -60,11 +60,11 @@ CWV_EXPORT
// credit card network icon.
@property(nonatomic, readonly, nullable) UIImage* icon;
// YES if this is a password autofill suggestion.
@property(nonatomic, readonly) BOOL isPasswordSuggestion;
- (instancetype)init NS_UNAVAILABLE;
// YES if this is a password autofill suggestion.
- (BOOL)isPasswordSuggestion;
@end
NS_ASSUME_NONNULL_END
......
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