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

Issue 2016313003: Adds unit tests for Offliner SavePage implementation. (Closed)

Created:
4 years, 6 months ago by dougarnett
Modified:
4 years, 6 months ago
CC:
chromium-reviews, romax+watch_chromium.org, fgorski+watch_chromium.org, dewittj+watch_chromium.org, petewil+watch_chromium.org, chili+watch_chromium.org, dimich+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Adds unit tests for Offliner SavePage implementation. BUG=601173 Committed: https://crrev.com/8c5b5db77e83c7ebb5878123358375771287cde7 Cr-Commit-Position: refs/heads/master@{#397411}

Patch Set 1 #

Total comments: 24

Patch Set 2 : Some naming changes per feedback #

Patch Set 3 : Introduces mock OfflinePageModel for offliner tests (including shareable base FakeOfflinePageModel) #

Patch Set 4 : fix build.gn file name and lint #

Total comments: 5

Patch Set 5 : Renamed Fake* to Stub* and added files to proper build target #

Unified diffs Side-by-side diffs Delta from patch set Stats (+363 lines, -36 lines) Patch
M chrome/browser/android/offline_pages/prerendering_offliner.h View 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/browser/android/offline_pages/prerendering_offliner.cc View 2 chunks +7 lines, -11 lines 0 comments Download
M chrome/browser/android/offline_pages/prerendering_offliner_unittest.cc View 1 2 3 4 10 chunks +194 lines, -18 lines 0 comments Download
M components/offline_pages.gypi View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M components/offline_pages/BUILD.gn View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
A components/offline_pages/stub_offline_page_model.h View 1 2 3 4 1 chunk +78 lines, -0 lines 0 comments Download
A components/offline_pages/stub_offline_page_model.cc View 1 2 3 4 1 chunk +78 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (8 generated)
dougarnett
2nd part of Offliner impl change => unit tests. For the moment, this is extending ...
4 years, 6 months ago (2016-05-27 18:11:35 UTC) #3
Pete Williamson
New tests look good. https://codereview.chromium.org/2016313003/diff/1/chrome/browser/android/offline_pages/prerendering_offliner_unittest.cc File chrome/browser/android/offline_pages/prerendering_offliner_unittest.cc (right): https://codereview.chromium.org/2016313003/diff/1/chrome/browser/android/offline_pages/prerendering_offliner_unittest.cc#newcode98 chrome/browser/android/offline_pages/prerendering_offliner_unittest.cc:98: // TODO(dougarnett): Remove this subclass ...
4 years, 6 months ago (2016-05-27 18:32:09 UTC) #4
fgorski
https://codereview.chromium.org/2016313003/diff/1/chrome/browser/android/offline_pages/prerendering_offliner_unittest.cc File chrome/browser/android/offline_pages/prerendering_offliner_unittest.cc (right): https://codereview.chromium.org/2016313003/diff/1/chrome/browser/android/offline_pages/prerendering_offliner_unittest.cc#newcode65 chrome/browser/android/offline_pages/prerendering_offliner_unittest.cc:65: mock_loading_ = false; Just a consideration: * Might mock_loading_ ...
4 years, 6 months ago (2016-05-27 18:43:11 UTC) #5
dougarnett
https://codereview.chromium.org/2016313003/diff/1/chrome/browser/android/offline_pages/prerendering_offliner_unittest.cc File chrome/browser/android/offline_pages/prerendering_offliner_unittest.cc (right): https://codereview.chromium.org/2016313003/diff/1/chrome/browser/android/offline_pages/prerendering_offliner_unittest.cc#newcode65 chrome/browser/android/offline_pages/prerendering_offliner_unittest.cc:65: mock_loading_ = false; On 2016/05/27 18:43:11, fgorski wrote: > ...
4 years, 6 months ago (2016-05-27 20:39:18 UTC) #6
Pete Williamson
https://codereview.chromium.org/2016313003/diff/1/chrome/browser/android/offline_pages/prerendering_offliner_unittest.cc File chrome/browser/android/offline_pages/prerendering_offliner_unittest.cc (right): https://codereview.chromium.org/2016313003/diff/1/chrome/browser/android/offline_pages/prerendering_offliner_unittest.cc#newcode98 chrome/browser/android/offline_pages/prerendering_offliner_unittest.cc:98: // TODO(dougarnett): Remove this subclass once OfflinePageModel is split ...
4 years, 6 months ago (2016-05-27 21:06:46 UTC) #7
fgorski
lgtm
4 years, 6 months ago (2016-05-31 20:06:12 UTC) #8
dougarnett
Now have mocked OfflinePageModel instead of extending offliner class. Added a FakeOfflinePageModel empty implementation to ...
4 years, 6 months ago (2016-06-01 17:51:10 UTC) #9
fgorski
https://codereview.chromium.org/2016313003/diff/60001/components/offline_pages/BUILD.gn File components/offline_pages/BUILD.gn (right): https://codereview.chromium.org/2016313003/diff/60001/components/offline_pages/BUILD.gn#newcode81 components/offline_pages/BUILD.gn:81: "fake_offline_page_model.h", I think this belongs in test_support and components/offline_pages.gypi:offline_pages_test_support ...
4 years, 6 months ago (2016-06-01 18:04:01 UTC) #10
Pete Williamson
LGTM with comments. https://codereview.chromium.org/2016313003/diff/60001/components/offline_pages/fake_offline_page_model.h File components/offline_pages/fake_offline_page_model.h (right): https://codereview.chromium.org/2016313003/diff/60001/components/offline_pages/fake_offline_page_model.h#newcode19 components/offline_pages/fake_offline_page_model.h:19: class FakeOfflinePageModel : public OfflinePageModel { ...
4 years, 6 months ago (2016-06-01 19:47:47 UTC) #11
dougarnett
Stub it is! https://codereview.chromium.org/2016313003/diff/60001/components/offline_pages/BUILD.gn File components/offline_pages/BUILD.gn (right): https://codereview.chromium.org/2016313003/diff/60001/components/offline_pages/BUILD.gn#newcode81 components/offline_pages/BUILD.gn:81: "fake_offline_page_model.h", On 2016/06/01 18:04:00, fgorski wrote: ...
4 years, 6 months ago (2016-06-01 20:28:28 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2016313003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2016313003/80001
4 years, 6 months ago (2016-06-01 23:27:40 UTC) #14
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-01 23:42:38 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2016313003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2016313003/80001
4 years, 6 months ago (2016-06-02 15:18:31 UTC) #19
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 6 months ago (2016-06-02 15:24:02 UTC) #21
commit-bot: I haz the power
4 years, 6 months ago (2016-06-02 15:25:50 UTC) #23
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/8c5b5db77e83c7ebb5878123358375771287cde7
Cr-Commit-Position: refs/heads/master@{#397411}

Powered by Google App Engine
This is Rietveld 408576698