Chromium Code Reviews
DescriptionRemove MockFormFetcherImpl from FormFetcherImplTest
MockFormFetcherImpl currently appears in FormFetcherImpl unittest. Its purpose
is to ensure that ProcessMigratedForms is called on a FormFetcher if an
associated HttpPasswordMigrator receives results from PasswordStore.
This is not necessary. It is sufficient to check that (A) HttpPasswordMigrator
receiving results from PasswordStore calls ProcessMigratedForms on its
consumer, and (B), that forms which the FormFetcher ends up with are the
migrated ones. (A) is tested in HttpPasswordMigratorTest::TestFullStore, (B) is
tested in FormFetcherImplTest.TryToMigrateHTTPPasswordsOnHTTPSSites through
EXPECT_CALL(consumer_, ProcessMatches(...https_form...)).
Moreover, having a test double for the tested class is a bad practice, which
could result in the test bypassing the production code when it should not.
Therefore, this CL removes MockFormFetcherImpl.
BUG=571580
Review-Url: https://codereview.chromium.org/2756543004
Cr-Commit-Position: refs/heads/master@{#457415}
Committed: https://chromium.googlesource.com/chromium/src/+/ff26a148d43106a3154d412c7f57902fb5a33fde
Patch Set 1 #
Messages
Total messages: 12 (8 generated)
|
|||||||||||||||||||