Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(406)

Issue 2756543004: Remove MockFormFetcherImpl from FormFetcherImplTest (Closed)

Created:
3 years, 9 months ago by vabr (Chromium)
Modified:
3 years, 9 months ago
Reviewers:
jdoerrie
CC:
chromium-reviews, gcasto+watchlist_chromium.org, vabr+watchlistpasswordmanager_chromium.org, vasilii
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -21 lines) Patch
M components/password_manager/core/browser/form_fetcher_impl_unittest.cc View 4 chunks +2 lines, -21 lines 0 comments Download

Messages

Total messages: 12 (8 generated)
vabr (Chromium)
Hi Jan, Could you PTAL? Thanks, Vaclav
3 years, 9 months ago (2017-03-16 11:55:57 UTC) #4
jdoerrie
lgtm
3 years, 9 months ago (2017-03-16 12:20:13 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2756543004/1
3 years, 9 months ago (2017-03-16 13:15:58 UTC) #9
commit-bot: I haz the power
3 years, 9 months ago (2017-03-16 13:20:18 UTC) #12
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/ff26a148d43106a3154d412c7f57...

Powered by Google App Engine
This is Rietveld 408576698