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

Issue 2322793003: [Offline Pages] Fix flaky test due to actual loading of database. (Closed)

Created:
4 years, 3 months ago by romax
Modified:
4 years, 3 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
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Offline Pages] Fix flaky test due to actual loading of database. The flaky was due to the issue when trying to load OfflinePageModel, it would crash with SQLite Error 1802. Fixed by mock the OfflinePageModel if we're in a testing environment. BUG=644570 Committed: https://crrev.com/dd2258ce9e678e3bdbcfe814649851882dfe8118 Cr-Commit-Position: refs/heads/master@{#417465}

Patch Set 1 #

Patch Set 2 : [Offline Pages] Fix flaky test due to actual loading of database. #

Patch Set 3 : fixing build. #

Total comments: 1

Patch Set 4 : Comments. #

Patch Set 5 : Move to testing_profile #

Patch Set 6 : fixing build. #

Patch Set 7 : Make include guarded by build flag check. #

Total comments: 1

Patch Set 8 : Removing unused includes. #

Patch Set 9 : Add offline_pages:test_support as dependency. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -1 line) Patch
M chrome/test/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/base/testing_profile.cc View 1 2 3 4 5 6 7 3 chunks +16 lines, -0 lines 0 comments Download
M components/offline_pages/BUILD.gn View 1 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M components/offline_pages/stub_offline_page_model.h View 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 36 (24 generated)
romax
thestig@chromium.org: Please review changes in chrome dimich@chromium.org: Please review changes in components/ Please let me ...
4 years, 3 months ago (2016-09-08 17:09:45 UTC) #10
Dmitry Titov
It's better to avoid adding the test code to the non-test target. Perhaps you want ...
4 years, 3 months ago (2016-09-08 17:16:54 UTC) #11
fgorski
drive by based on discussion https://codereview.chromium.org/2322793003/diff/40001/chrome/browser/android/offline_pages/offline_page_model_factory.cc File chrome/browser/android/offline_pages/offline_page_model_factory.cc (right): https://codereview.chromium.org/2322793003/diff/40001/chrome/browser/android/offline_pages/offline_page_model_factory.cc#newcode23 chrome/browser/android/offline_pages/offline_page_model_factory.cc:23: std::unique_ptr<KeyedService> BuildMockOfflinePageModelFactory( how about ...
4 years, 3 months ago (2016-09-08 17:18:57 UTC) #13
romax
updated per comments. PTAL, thanks!
4 years, 3 months ago (2016-09-08 17:56:59 UTC) #14
fgorski
test/BUILD.gn may need to be updated.
4 years, 3 months ago (2016-09-08 18:07:28 UTC) #15
Lei Zhang
Please consider asking chrome/browser/android/offline_pages/OWNERS + chrome/test/base/OWNERS next time. https://codereview.chromium.org/2322793003/diff/120001/chrome/test/base/testing_profile.cc File chrome/test/base/testing_profile.cc (right): https://codereview.chromium.org/2322793003/diff/120001/chrome/test/base/testing_profile.cc#newcode52 chrome/test/base/testing_profile.cc:52: #include ...
4 years, 3 months ago (2016-09-08 19:12:11 UTC) #22
Dmitry Titov
lgtm It'd be better to "Publish+Mail Comments" after you upload updated patch so there is ...
4 years, 3 months ago (2016-09-08 20:53:29 UTC) #27
Lei Zhang
rs lgtm
4 years, 3 months ago (2016-09-08 21:07:25 UTC) #28
romax
Thanks for the comments and the tip. I wasn't sending out emails since I wanted ...
4 years, 3 months ago (2016-09-08 23:07:42 UTC) #31
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/2322793003/160001
4 years, 3 months ago (2016-09-09 00:11:21 UTC) #33
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 3 months ago (2016-09-09 00:53:21 UTC) #34
commit-bot: I haz the power
4 years, 3 months ago (2016-09-09 00:55:44 UTC) #36
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/dd2258ce9e678e3bdbcfe814649851882dfe8118
Cr-Commit-Position: refs/heads/master@{#417465}

Powered by Google App Engine
This is Rietveld 408576698