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

Issue 1940843002: [NTP Snippets] Add unit tests for NTPSnippetsFetcher (Closed)

Created:
4 years, 7 months ago by mastiz
Modified:
4 years, 7 months ago
Reviewers:
Marc Treib
CC:
chromium-reviews, mcwilliams+watch_chromium.org, dgn+watch_chromium.org, jkrcal
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[NTP Snippets] Add unit tests for NTPSnippetsFetcher The class had almost no coverage given that, besides not having unit tests, the ones for NTPSnippetsService don't actually exercise the fetcher. The proposed tests make use of FakeURLFetcherFactory to exercise basic success and failure cases and verify how callbacks are triggered. FakeURLFetcherFactory doesn't however support verifying features like the uploaded POST data for selected hosts which is left outside the scope of this patch. BUG=584428 Committed: https://crrev.com/302f9f70265f86097aa3bc4c7695fe99d067b47c Cr-Commit-Position: refs/heads/master@{#390950}

Patch Set 1 #

Patch Set 2 : Nits #

Total comments: 10

Patch Set 3 : Addressed minor comments. #

Patch Set 4 : Added Times(1) for clarity as suggested #

Patch Set 5 : Fixed build for linux_chromium_chromeos_compile_dbg_ng #

Unified diffs Side-by-side diffs Delta from patch set Stats (+135 lines, -1 line) Patch
M components/components_tests.gyp View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M components/ntp_snippets/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M components/ntp_snippets/ntp_snippets_fetcher.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M components/ntp_snippets/ntp_snippets_fetcher.cc View 1 chunk +0 lines, -1 line 0 comments Download
A components/ntp_snippets/ntp_snippets_fetcher_unittest.cc View 1 2 3 4 1 chunk +129 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 24 (11 generated)
mastiz
4 years, 7 months ago (2016-05-02 10:09:19 UTC) #2
Marc Treib
Very nice! LGTM with some small comments below. Also +jkrcal FYI https://codereview.chromium.org/1940843002/diff/20001/components/ntp_snippets/BUILD.gn File components/ntp_snippets/BUILD.gn (right): ...
4 years, 7 months ago (2016-05-02 11:12:01 UTC) #3
mastiz
https://codereview.chromium.org/1940843002/diff/20001/components/ntp_snippets/BUILD.gn File components/ntp_snippets/BUILD.gn (right): https://codereview.chromium.org/1940843002/diff/20001/components/ntp_snippets/BUILD.gn#newcode42 components/ntp_snippets/BUILD.gn:42: "ntp_snippets_fetcher_unittest.cc", On 2016/05/02 11:12:00, Marc Treib wrote: > You ...
4 years, 7 months ago (2016-05-02 12:34:29 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1940843002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1940843002/60001
4 years, 7 months ago (2016-05-02 12:35:08 UTC) #7
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/168528)
4 years, 7 months ago (2016-05-02 12:52:01 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1940843002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1940843002/80001
4 years, 7 months ago (2016-05-02 13:37:26 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: ios_rel_device_gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_gn/builds/28173)
4 years, 7 months ago (2016-05-02 13:43:59 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1940843002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1940843002/80001
4 years, 7 months ago (2016-05-02 13:57:28 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: ios_rel_device_gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_gn/builds/28187)
4 years, 7 months ago (2016-05-02 14:03:51 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1940843002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1940843002/80001
4 years, 7 months ago (2016-05-02 14:20:43 UTC) #20
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 7 months ago (2016-05-02 15:40:02 UTC) #21
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/302f9f70265f86097aa3bc4c7695fe99d067b47c Cr-Commit-Position: refs/heads/master@{#390950}
4 years, 7 months ago (2016-05-02 15:42:28 UTC) #23
Dirk Pranke
4 years, 7 months ago (2016-05-02 17:08:22 UTC) #24
Message was sent while issue was closed.
A revert of this CL (patchset #5 id:80001) has been created in
https://codereview.chromium.org/1942913002/ by dpranke@chromium.org.

The reason for reverting is: I think this broke components_unittests on iOS:

https://build.chromium.org/p/chromium.mac/builders/iOS_Simulator_%28dbg%29/bu....

Powered by Google App Engine
This is Rietveld 408576698