Commit 3894c1ca authored by Friedrich Horschig's avatar Friedrich Horschig Committed by Commit Bot

[Passwords] Initialize uses_account_store in PasswordAndMetadata

Initialize the bool member PasswordsAndMetadata::uses_account_store to
false which caused msan failures. Reenable the tests covering this.

Bug: 1020257
Change-Id: I72b74797d0a2309320a814c4c6d4b4ab4dc347d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1897660
Commit-Queue: Vasilii Sukhanov <vasilii@chromium.org>
Reviewed-by: default avatarVasilii Sukhanov <vasilii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#712141}
parent 7b5644fe
......@@ -24,7 +24,7 @@ struct ParsingResult {
struct PasswordAndMetadata {
base::string16 password;
std::string realm;
bool uses_account_store;
bool uses_account_store = false;
};
// Structure used for autofilling password forms. Note that the realms in this
......
......@@ -312,15 +312,9 @@ TEST_F(PasswordAutofillManagerTest, ExternalDelegatePasswordSuggestions) {
}
}
// TODO(1020257): Flaky for MSAN.
#if defined(MEMORY_SANITIZER)
#define MAYBE_ExtractSuggestions DISABLED_ExtractSuggestions
#else
#define MAYBE_ExtractSuggestions ExtractSuggestions
#endif
// Test that OnShowPasswordSuggestions correctly matches the given FormFieldData
// to the known PasswordFormFillData, and extracts the right suggestions.
TEST_F(PasswordAutofillManagerTest, MAYBE_ExtractSuggestions) {
TEST_F(PasswordAutofillManagerTest, ExtractSuggestions) {
std::unique_ptr<TestPasswordManagerClient> client(
new TestPasswordManagerClient);
std::unique_ptr<MockAutofillClient> autofill_client(new MockAutofillClient);
......@@ -379,19 +373,10 @@ TEST_F(PasswordAutofillManagerTest, MAYBE_ExtractSuggestions) {
element_bounds);
}
// TODO(1020257): Flaky for MSAN.
#if defined(MEMORY_SANITIZER)
#define MAYBE_PrettifiedAndroidRealmsAreShownAsLabels \
DISABLED_PrettifiedAndroidRealmsAreShownAsLabels
#else
#define MAYBE_PrettifiedAndroidRealmsAreShownAsLabels \
PrettifiedAndroidRealmsAreShownAsLabels
#endif
// Verify that, for Android application credentials, the prettified realms of
// applications are displayed as the labels of suggestions on the UI (for
// matches of all levels of preferredness).
TEST_F(PasswordAutofillManagerTest,
MAYBE_PrettifiedAndroidRealmsAreShownAsLabels) {
TEST_F(PasswordAutofillManagerTest, PrettifiedAndroidRealmsAreShownAsLabels) {
std::unique_ptr<TestPasswordManagerClient> client(
new TestPasswordManagerClient);
std::unique_ptr<MockAutofillClient> autofill_client(new MockAutofillClient);
......@@ -450,18 +435,9 @@ TEST_F(PasswordAutofillManagerTest, FillSuggestionPasswordField) {
element_bounds);
}
// TODO(1020257): Flaky for MSAN.
#if defined(MEMORY_SANITIZER)
#define MAYBE_DisplaySuggestionsWithMatchingTokens \
DISABLED_DisplaySuggestionsWithMatchingTokens
#else
#define MAYBE_DisplaySuggestionsWithMatchingTokens \
DisplaySuggestionsWithMatchingTokens
#endif
// Verify that typing "foo" into the username field will match usernames
// "foo.bar@example.com", "bar.foo@example.com" and "example@foo.com".
TEST_F(PasswordAutofillManagerTest,
MAYBE_DisplaySuggestionsWithMatchingTokens) {
TEST_F(PasswordAutofillManagerTest, DisplaySuggestionsWithMatchingTokens) {
base::test::ScopedFeatureList features;
features.InitAndEnableFeature(
autofill::features::kAutofillTokenPrefixMatching);
......@@ -526,19 +502,11 @@ TEST_F(PasswordAutofillManagerTest, NoSuggestionForNonPrefixTokenMatch) {
base::i18n::RIGHT_TO_LEFT, base::ASCIIToUTF16("oo"), 0, element_bounds);
}
// TODO(1020257): Flaky for MSAN.
#if defined(MEMORY_SANITIZER)
#define MAYBE_MatchingContentsWithSuggestionTokenSeparator \
DISABLED_MatchingContentsWithSuggestionTokenSeparator
#else
#define MAYBE_MatchingContentsWithSuggestionTokenSeparator \
MatchingContentsWithSuggestionTokenSeparator
#endif
// Verify that typing "foo@exam" into the username field will match username
// "bar.foo@example.com" even if the field contents span accross multiple
// tokens.
TEST_F(PasswordAutofillManagerTest,
MAYBE_MatchingContentsWithSuggestionTokenSeparator) {
MatchingContentsWithSuggestionTokenSeparator) {
base::test::ScopedFeatureList features;
features.InitAndEnableFeature(
autofill::features::kAutofillTokenPrefixMatching);
......@@ -573,19 +541,11 @@ TEST_F(PasswordAutofillManagerTest,
element_bounds);
}
// TODO(1020257): Flaky for MSAN.
#if defined(MEMORY_SANITIZER)
#define MAYBE_DisplaySuggestionsWithPrefixesPrecedeSubstringMatched \
DISABLED_DisplaySuggestionsWithPrefixesPrecedeSubstringMatched
#else
#define MAYBE_DisplaySuggestionsWithPrefixesPrecedeSubstringMatched \
DisplaySuggestionsWithPrefixesPrecedeSubstringMatched
#endif
// Verify that typing "example" into the username field will match and order
// usernames "example@foo.com", "foo.bar@example.com" and "bar.foo@example.com"
// i.e. prefix matched followed by substring matched.
TEST_F(PasswordAutofillManagerTest,
MAYBE_DisplaySuggestionsWithPrefixesPrecedeSubstringMatched) {
DisplaySuggestionsWithPrefixesPrecedeSubstringMatched) {
base::test::ScopedFeatureList features;
features.InitAndEnableFeature(
autofill::features::kAutofillTokenPrefixMatching);
......
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