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

Issue 1022823002: Make test outputs involving PasswordForms more readable. (Closed)

Created:
5 years, 9 months ago by engedy
Modified:
5 years, 8 months ago
CC:
chromium-reviews, tim+watch_chromium.org, zea+watch_chromium.org, maxbogue+watch_chromium.org, browser-components-watch_chromium.org, pvalenzuela+watch_chromium.org, plaree+watch_chromium.org, estade+watch_chromium.org, gcasto+watchlist_chromium.org, mkwst+watchlist-passwords_chromium.org, rouslan+autofillwatch_chromium.org, maniscalco+watch_chromium.org, tim (not reviewing)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make test outputs more readable whenever PasswordForms are involved. This CL improves ContainsEqualPasswordFormsUnordered (and the corresponding GMock matcher) so that it outputs both the unmatched expected *and* actual values, and outputs them only once, even if the matcher is evaluated multiple times. Furthermore, PasswordForms themselves are now outputted as JSON, prettiefied, and omitting the default values. Finally, pointers to PasswordForms are now outputted reasonably as well, showing the contents, instead of showing the memory addresses. Dependent Sync integration tests have been refactored. BUG=437865 Committed: https://crrev.com/c0830f221223891292888c0cef11c2751bb40f99 Cr-Commit-Position: refs/heads/master@{#323224}

Patch Set 1 : #

Total comments: 8

Patch Set 2 : Address comments. #

Patch Set 3 : Use lambda and erase-remove idiom. #

Patch Set 4 : Fix typo. #

Total comments: 8

Patch Set 5 : Fixed more comments. #

Patch Set 6 : Rebase + added new field that was added inbetween. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+176 lines, -122 lines) Patch
M chrome/browser/password_manager/password_store_win_unittest.cc View 3 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/password_manager/password_store_x_unittest.cc View 4 chunks +15 lines, -11 lines 0 comments Download
M chrome/browser/sync/test/integration/passwords_helper.cc View 3 chunks +22 lines, -24 lines 0 comments Download
M components/autofill/core/common/password_form.h View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M components/autofill/core/common/password_form.cc View 1 2 3 4 5 2 chunks +73 lines, -32 lines 0 comments Download
M components/password_manager/core/browser/password_manager_test_utils.h View 1 2 chunks +13 lines, -11 lines 0 comments Download
M components/password_manager/core/browser/password_manager_test_utils.cc View 1 2 3 4 2 chunks +32 lines, -29 lines 0 comments Download
M components/password_manager/core/browser/password_store_default_unittest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M components/password_manager/core/browser/password_store_unittest.cc View 3 chunks +12 lines, -8 lines 0 comments Download

Messages

Total messages: 26 (8 generated)
engedy
@Vaclav, could you please take a look?
5 years, 9 months ago (2015-03-19 12:44:32 UTC) #3
engedy
For reference, test outputs involving ContainsSamePasswordForms looked like this: [2499:2499:0319/134329:616719509463:ERROR:password_manager_test_utils.cc(83)] No match for: scheme: 0 ...
5 years, 9 months ago (2015-03-19 12:45:30 UTC) #4
engedy
Now they look like this: Unexpected mock function call - returning directly. Function call: OnGetPasswordStoreResultsConstRef(@0x7fff8d926808 ...
5 years, 9 months ago (2015-03-19 12:47:13 UTC) #5
vabr (Chromium)
Thanks, this looks awesome! LGTM, because it is a big improvement against the current state ...
5 years, 9 months ago (2015-03-19 13:28:12 UTC) #6
engedy
Thanks for pointing out the ambiguity introduced by duplicates. I have changed the implementation to ...
5 years, 9 months ago (2015-03-20 13:17:16 UTC) #7
engedy
As per offline discussion, I got rid of the std::set. I am now also using ...
5 years, 9 months ago (2015-03-20 13:57:37 UTC) #8
vabr (Chromium)
LGTM already, some minor comments to optionally consider. Cheers, Vaclav https://codereview.chromium.org/1022823002/diff/80001/components/password_manager/core/browser/password_manager_test_utils.cc File components/password_manager/core/browser/password_manager_test_utils.cc (right): https://codereview.chromium.org/1022823002/diff/80001/components/password_manager/core/browser/password_manager_test_utils.cc#newcode61 ...
5 years, 9 months ago (2015-03-20 14:10:49 UTC) #9
engedy
Thanks for pointing out the code smells! I have addressed all concerns modulo the one ...
5 years, 9 months ago (2015-03-20 16:15:06 UTC) #10
vabr (Chromium)
LGTM unconditionally! :) https://codereview.chromium.org/1022823002/diff/80001/components/password_manager/core/browser/password_manager_test_utils.cc File components/password_manager/core/browser/password_manager_test_utils.cc (right): https://codereview.chromium.org/1022823002/diff/80001/components/password_manager/core/browser/password_manager_test_utils.cc#newcode65 components/password_manager/core/browser/password_manager_test_utils.cc:65: auto it_matching_expectation = std::remove_if( On 2015/03/20 ...
5 years, 9 months ago (2015-03-20 16:19:58 UTC) #11
engedy
@Tim, could you please review c/b/sync/test for OWNER's approval? The sync integration test output in ...
5 years, 9 months ago (2015-03-20 16:22:21 UTC) #13
engedy
Rerouting to Drew. @Drew, could you please take a look? (Please see caveats are in ...
5 years, 8 months ago (2015-03-31 09:55:42 UTC) #15
engedy
@Drew, Just to clarify, you need not look at the entire CL, only c/b/sync/test.
5 years, 8 months ago (2015-03-31 10:56:28 UTC) #16
Andrew T Wilson (Slow)
sync lgtm
5 years, 8 months ago (2015-03-31 14:27:48 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1022823002/100001
5 years, 8 months ago (2015-03-31 14:34:28 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/10261) ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, ...
5 years, 8 months ago (2015-03-31 14:37:16 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1022823002/120001
5 years, 8 months ago (2015-04-01 12:26:51 UTC) #24
commit-bot: I haz the power
Committed patchset #6 (id:120001)
5 years, 8 months ago (2015-04-01 13:17:05 UTC) #25
commit-bot: I haz the power
5 years, 8 months ago (2015-04-01 13:18:07 UTC) #26
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/c0830f221223891292888c0cef11c2751bb40f99
Cr-Commit-Position: refs/heads/master@{#323224}

Powered by Google App Engine
This is Rietveld 408576698