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

Issue 2291593002: Refactor OfflinePageSuggestionsProviderTest (Closed)

Created:
4 years, 3 months ago by Philipp Keck
Modified:
4 years, 3 months ago
Reviewers:
Marc Treib, tschumann
CC:
chromium-reviews, ntp-dev+reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor OfflinePageSuggestionsProviderTest Instead of using a MOCK_METHOD and a helper method for verifying the callback result of GetDismissedSuggestionsForDebugging, use a helper method that captures the callback data and moves it to a vector on the test method's stack. BUG=628198

Patch Set 1 #

Total comments: 5

Patch Set 2 : Tim's comments #

Total comments: 6

Patch Set 3 : Tim's new comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -66 lines) Patch
M components/ntp_snippets/offline_pages/offline_page_suggestions_provider_unittest.cc View 1 2 12 chunks +56 lines, -66 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 8 (1 generated)
Philipp Keck
PTAL
4 years, 3 months ago (2016-08-29 14:49:35 UTC) #2
Marc Treib
lgtm https://codereview.chromium.org/2291593002/diff/1/components/ntp_snippets/offline_pages/offline_page_suggestions_provider_unittest.cc File components/ntp_snippets/offline_pages/offline_page_suggestions_provider_unittest.cc (right): https://codereview.chromium.org/2291593002/diff/1/components/ntp_snippets/offline_pages/offline_page_suggestions_provider_unittest.cc#newcode156 components/ntp_snippets/offline_pages/offline_page_suggestions_provider_unittest.cc:156: void CaptureDismissedSuggestions( This could be a global function, ...
4 years, 3 months ago (2016-08-29 14:54:29 UTC) #3
tschumann
thanks! https://codereview.chromium.org/2291593002/diff/1/components/ntp_snippets/offline_pages/offline_page_suggestions_provider_unittest.cc File components/ntp_snippets/offline_pages/offline_page_suggestions_provider_unittest.cc (right): https://codereview.chromium.org/2291593002/diff/1/components/ntp_snippets/offline_pages/offline_page_suggestions_provider_unittest.cc#newcode156 components/ntp_snippets/offline_pages/offline_page_suggestions_provider_unittest.cc:156: void CaptureDismissedSuggestions( On 2016/08/29 14:54:29, Marc Treib wrote: ...
4 years, 3 months ago (2016-08-29 15:19:11 UTC) #4
Philipp Keck
Thank you https://codereview.chromium.org/2291593002/diff/1/components/ntp_snippets/offline_pages/offline_page_suggestions_provider_unittest.cc File components/ntp_snippets/offline_pages/offline_page_suggestions_provider_unittest.cc (right): https://codereview.chromium.org/2291593002/diff/1/components/ntp_snippets/offline_pages/offline_page_suggestions_provider_unittest.cc#newcode156 components/ntp_snippets/offline_pages/offline_page_suggestions_provider_unittest.cc:156: void CaptureDismissedSuggestions( On 2016/08/29 15:19:11, tschumann wrote: ...
4 years, 3 months ago (2016-08-29 15:27:05 UTC) #5
tschumann
lgtm some more nits as we're already here. But overall looks really goods :) https://codereview.chromium.org/2291593002/diff/20001/components/ntp_snippets/offline_pages/offline_page_suggestions_provider_unittest.cc ...
4 years, 3 months ago (2016-08-29 15:47:01 UTC) #6
Philipp Keck
https://codereview.chromium.org/2291593002/diff/20001/components/ntp_snippets/offline_pages/offline_page_suggestions_provider_unittest.cc File components/ntp_snippets/offline_pages/offline_page_suggestions_provider_unittest.cc (right): https://codereview.chromium.org/2291593002/diff/20001/components/ntp_snippets/offline_pages/offline_page_suggestions_provider_unittest.cc#newcode87 components/ntp_snippets/offline_pages/offline_page_suggestions_provider_unittest.cc:87: class MockOfflinePageModel : public StubOfflinePageModel { On 2016/08/29 15:47:00, ...
4 years, 3 months ago (2016-08-29 17:04:15 UTC) #7
tschumann
4 years, 3 months ago (2016-08-29 17:20:36 UTC) #8
lgtm

Powered by Google App Engine
This is Rietveld 408576698