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

Issue 2697803003: Improve test coverage for ContentFaviconDriver (Closed)

Created:
3 years, 10 months ago by mastiz
Modified:
3 years, 9 months ago
CC:
chromium-reviews, darin-cc_chromium.org, noyau+watch_chromium.org, jam, browser-components-watch_chromium.org, ntp-dev+reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Improve test coverage for ContentFaviconDriver We need this prior to adding new features to the class hierarchy, most notably the support for multiple favicons of the same type (i.e. for different resolutions). The main issue with the former tests is that they don't exercise the public API, but instead parts of the implementation. In order to do this, TestWebContents must be extended with basic support for testing DownloadImage(). BUG=694312 Review-Url: https://codereview.chromium.org/2697803003 Cr-Commit-Position: refs/heads/master@{#453680} Committed: https://chromium.googlesource.com/chromium/src/+/ba3a4d8ad97649db9ce47979a18f93fd07b0499e

Patch Set 1 #

Patch Set 2 : WIP iOS #

Patch Set 3 : Formatting. #

Total comments: 7

Patch Set 4 : Rebased #

Patch Set 5 : Rebased. #

Patch Set 6 : Rebased. #

Total comments: 1

Patch Set 7 : Rebased. #

Patch Set 8 : Use forward declarations #

Patch Set 9 : Rebased. #

Patch Set 10 : Adopt PostReply. #

Patch Set 11 : Simplify tests. #

Patch Set 12 : Minor revert. #

Total comments: 17

Patch Set 13 : Addressed comments. #

Patch Set 14 : Addressed comments. #

Patch Set 15 : Trivial rename. #

Patch Set 16 : Trivial rename. #

Total comments: 12

Patch Set 17 : Addressed comments. #

Patch Set 18 : Addressed comments. #

Total comments: 6

Patch Set 19 : Addressed more comments. #

Patch Set 20 : Minor test renames. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+143 lines, -47 lines) Patch
M components/favicon/content/content_favicon_driver_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +87 lines, -46 lines 0 comments Download
M content/public/test/web_contents_tester.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +18 lines, -0 lines 0 comments Download
M content/test/test_web_contents.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +16 lines, -0 lines 0 comments Download
M content/test/test_web_contents.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +22 lines, -1 line 0 comments Download

Messages

Total messages: 69 (49 generated)
mastiz
pkotwicz@: some iOS tests need to be updated but otherwise this looks ready for review. ...
3 years, 10 months ago (2017-02-14 17:16:50 UTC) #10
pkotwicz
At a high level: - Making FaviconService an interface sounds good to me - It ...
3 years, 10 months ago (2017-02-15 04:43:00 UTC) #11
mastiz
PTAL! On 2017/02/15 04:43:00, pkotwicz wrote: > At a high level: > - Making FaviconService ...
3 years, 10 months ago (2017-02-15 15:06:29 UTC) #17
pkotwicz
> I have the impression the test coverage proposed in these tests is clearly an ...
3 years, 10 months ago (2017-02-16 00:34:09 UTC) #18
mastiz
phajdan.jr@chromium.org: Please review changes in content/ I'm in the process of discussing with pkotwicz@ whether ...
3 years, 10 months ago (2017-02-17 13:41:33 UTC) #30
Paweł Hajdan Jr.
LGTM https://codereview.chromium.org/2697803003/diff/100001/content/public/test/web_contents_tester.h File content/public/test/web_contents_tester.h (right): https://codereview.chromium.org/2697803003/diff/100001/content/public/test/web_contents_tester.h#newcode12 content/public/test/web_contents_tester.h:12: #include "third_party/skia/include/core/SkBitmap.h" nit: Is it possible to forward ...
3 years, 10 months ago (2017-02-21 09:44:23 UTC) #34
mastiz
On 2017/02/21 09:44:23, Paweł Hajdan Jr. wrote: > LGTM > > https://codereview.chromium.org/2697803003/diff/100001/content/public/test/web_contents_tester.h > File content/public/test/web_contents_tester.h ...
3 years, 10 months ago (2017-02-21 13:48:24 UTC) #36
mastiz
PTAL! On 2017/02/16 00:34:09, pkotwicz wrote: > > I have the impression the test coverage ...
3 years, 10 months ago (2017-02-21 16:14:45 UTC) #49
mastiz
pkotwicz@: this is ready for review, thanks!
3 years, 10 months ago (2017-02-22 16:37:51 UTC) #51
pkotwicz
Looks mostly good. Sorry for the delay https://codereview.chromium.org/2697803003/diff/220001/components/favicon/content/content_favicon_driver_unittest.cc File components/favicon/content/content_favicon_driver_unittest.cc (right): https://codereview.chromium.org/2697803003/diff/220001/components/favicon/content/content_favicon_driver_unittest.cc#newcode41 components/favicon/content/content_favicon_driver_unittest.cc:41: _, _, ...
3 years, 10 months ago (2017-02-22 19:34:16 UTC) #55
mastiz
Thx, PTAL! phajdan.jr@: can you also take another look after I added one more function ...
3 years, 10 months ago (2017-02-22 20:53:14 UTC) #56
Paweł Hajdan Jr.
LGTM
3 years, 10 months ago (2017-02-22 20:57:16 UTC) #57
pkotwicz
Just nits. L-G-T-M when you have addressed them :) https://codereview.chromium.org/2697803003/diff/220001/components/favicon/content/content_favicon_driver_unittest.cc File components/favicon/content/content_favicon_driver_unittest.cc (right): https://codereview.chromium.org/2697803003/diff/220001/components/favicon/content/content_favicon_driver_unittest.cc#newcode63 components/favicon/content/content_favicon_driver_unittest.cc:63: ...
3 years, 10 months ago (2017-02-23 16:20:49 UTC) #58
mastiz
PTAL. https://codereview.chromium.org/2697803003/diff/220001/components/favicon/content/content_favicon_driver_unittest.cc File components/favicon/content/content_favicon_driver_unittest.cc (right): https://codereview.chromium.org/2697803003/diff/220001/components/favicon/content/content_favicon_driver_unittest.cc#newcode108 components/favicon/content/content_favicon_driver_unittest.cc:108: content::FaviconURL::FAVICON, _, _, _)); On 2017/02/23 16:20:49, pkotwicz ...
3 years, 10 months ago (2017-02-24 21:15:38 UTC) #59
pkotwicz
LGTM Thank you for bearing with me https://codereview.chromium.org/2697803003/diff/290001/components/favicon/content/content_favicon_driver_unittest.cc File components/favicon/content/content_favicon_driver_unittest.cc (right): https://codereview.chromium.org/2697803003/diff/290001/components/favicon/content/content_favicon_driver_unittest.cc#newcode73 components/favicon/content/content_favicon_driver_unittest.cc:73: TEST_F(ContentFaviconDriverTest, ShouldCacheAvailableFavicon) ...
3 years, 9 months ago (2017-02-27 15:29:07 UTC) #60
mastiz
Thanks! Will land after a grace period, to see if you'd rather have tests with ...
3 years, 9 months ago (2017-02-27 21:05:57 UTC) #61
pkotwicz
https://codereview.chromium.org/2697803003/diff/290001/components/favicon/content/content_favicon_driver_unittest.cc File components/favicon/content/content_favicon_driver_unittest.cc (right): https://codereview.chromium.org/2697803003/diff/290001/components/favicon/content/content_favicon_driver_unittest.cc#newcode85 components/favicon/content/content_favicon_driver_unittest.cc:85: The current form of this particular test is ShouldCallUnableToDownloadFaviconFor404() ...
3 years, 9 months ago (2017-02-27 23:58:21 UTC) #62
mastiz
On 2017/02/27 23:58:21, pkotwicz wrote: > https://codereview.chromium.org/2697803003/diff/290001/components/favicon/content/content_favicon_driver_unittest.cc > File components/favicon/content/content_favicon_driver_unittest.cc (right): > > https://codereview.chromium.org/2697803003/diff/290001/components/favicon/content/content_favicon_driver_unittest.cc#newcode85 > ...
3 years, 9 months ago (2017-02-28 18:48:52 UTC) #63
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/2697803003/370001
3 years, 9 months ago (2017-02-28 18:49:49 UTC) #66
commit-bot: I haz the power
3 years, 9 months ago (2017-02-28 20:05:50 UTC) #69
Message was sent while issue was closed.
Committed patchset #20 (id:370001) as
https://chromium.googlesource.com/chromium/src/+/ba3a4d8ad97649db9ce47979a18f...

Powered by Google App Engine
This is Rietveld 408576698