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

Issue 69583002: Refactor some ProfileSyncServiceTests (Closed)

Created:
7 years, 1 month ago by rlarocque
Modified:
7 years, 1 month ago
Reviewers:
Nicolas Zea, pavely
CC:
chromium-reviews, tim+watch_chromium.org, rsimha+watch_chromium.org, haitaol+watch_chromium.org
Visibility:
Public.

Description

Refactor some ProfileSyncServiceTests Create a new test framework class named ProfileSyncServiceSimpleTest and use it to replace several ProfileSyncServiceTests. This newer framework takes advantage of MockSyncBackendHost and allows us to use a real ProfileSyncService in these tests. The resulting tests are better at testing the ProfileSyncService, but they no longer test any part of the SyncBackendHost code. This is a desirable trade off because these are unit tests. BUG=312994 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=235661

Patch Set 1 #

Patch Set 2 : Rever some unnecessary changes #

Patch Set 3 : More reversions #

Total comments: 10

Patch Set 4 : Review fixes #

Patch Set 5 : Add explicit virtual dtor #

Patch Set 6 : Add another suppress tests #

Total comments: 4

Patch Set 7 : Reduce threading #

Patch Set 8 : Use UI_MAINLOOP #

Patch Set 9 : Rebase? #

Unified diffs Side-by-side diffs Delta from patch set Stats (+249 lines, -127 lines) Patch
M chrome/browser/sync/profile_sync_service_unittest.cc View 1 2 3 4 5 6 7 8 3 chunks +249 lines, -127 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
rlarocque
Please review. This CL overlaps a bit with Pavel's work on some of the tests ...
7 years, 1 month ago (2013-11-11 23:04:37 UTC) #1
Nicolas Zea
https://codereview.chromium.org/69583002/diff/50001/chrome/browser/sync/profile_sync_service_unittest.cc File chrome/browser/sync/profile_sync_service_unittest.cc (right): https://codereview.chromium.org/69583002/diff/50001/chrome/browser/sync/profile_sync_service_unittest.cc#newcode57 chrome/browser/sync/profile_sync_service_unittest.cc:57: ProfileSyncServiceTest() nit: this should have a virtual destructor btw ...
7 years, 1 month ago (2013-11-13 21:06:45 UTC) #2
rlarocque
Patch updated. PTAL. https://codereview.chromium.org/69583002/diff/50001/chrome/browser/sync/profile_sync_service_unittest.cc File chrome/browser/sync/profile_sync_service_unittest.cc (right): https://codereview.chromium.org/69583002/diff/50001/chrome/browser/sync/profile_sync_service_unittest.cc#newcode201 chrome/browser/sync/profile_sync_service_unittest.cc:201: class ProfileSyncServiceSimpleTest : public ::testing::Test { ...
7 years, 1 month ago (2013-11-13 22:28:25 UTC) #3
Nicolas Zea
https://codereview.chromium.org/69583002/diff/50001/chrome/browser/sync/profile_sync_service_unittest.cc File chrome/browser/sync/profile_sync_service_unittest.cc (right): https://codereview.chromium.org/69583002/diff/50001/chrome/browser/sync/profile_sync_service_unittest.cc#newcode389 chrome/browser/sync/profile_sync_service_unittest.cc:389: ExpectSyncBackendHostCreation(); On 2013/11/13 22:28:25, rlarocque wrote: > On 2013/11/13 ...
7 years, 1 month ago (2013-11-13 22:37:20 UTC) #4
rlarocque
I've added the other test we discussed offline. PTAL.
7 years, 1 month ago (2013-11-13 23:38:57 UTC) #5
Nicolas Zea
LGTM with two questions https://codereview.chromium.org/69583002/diff/180002/chrome/browser/sync/profile_sync_service_unittest.cc File chrome/browser/sync/profile_sync_service_unittest.cc (right): https://codereview.chromium.org/69583002/diff/180002/chrome/browser/sync/profile_sync_service_unittest.cc#newcode212 chrome/browser/sync/profile_sync_service_unittest.cc:212: : thread_bundle_(content::TestBrowserThreadBundle::REAL_DB_THREAD | if these ...
7 years, 1 month ago (2013-11-13 23:48:59 UTC) #6
rlarocque
Good points about the threading code. I think we can simplify it a bit. I've ...
7 years, 1 month ago (2013-11-14 00:41:38 UTC) #7
Nicolas Zea
On 2013/11/14 00:41:38, rlarocque wrote: > Good points about the threading code. I think we ...
7 years, 1 month ago (2013-11-14 00:45:49 UTC) #8
rlarocque
> > Regarding the testing profile, I suspect you might be able to get away ...
7 years, 1 month ago (2013-11-14 00:57:05 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/69583002/320001
7 years, 1 month ago (2013-11-15 18:08:01 UTC) #10
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=225271
7 years, 1 month ago (2013-11-15 19:39:12 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/69583002/320001
7 years, 1 month ago (2013-11-15 20:07:51 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/69583002/320001
7 years, 1 month ago (2013-11-15 22:14:34 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/69583002/320001
7 years, 1 month ago (2013-11-16 00:46:50 UTC) #14
commit-bot: I haz the power
7 years, 1 month ago (2013-11-18 08:19:31 UTC) #15
Message was sent while issue was closed.
Change committed as 235661

Powered by Google App Engine
This is Rietveld 408576698