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

Issue 67683005: Clean up TestProfileSyncService and related tests (Closed)

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

Description

Clean up TestProfileSyncService and related tests This CL refactors many of the tests in profile_sync_service_unittest.cc. It continues the refactoring work begun in r233533, r235661, and r235854. The JsController tests have been deleted. There is not much point in testing the JsController here; it can be more easily tested on its own in sync_js_controller_uniittest.cc. The SyncJsController unit tests have been updated so they now cover the few cases that were formerly only exercised in the ProfileSyncService unit tests. It converts all remaining uncoverted tests from relying on the TestProfileSyncService to using a real ProfileSyncService with an injected backend. The injected backend makes it easier to create the scenarios we want to test. We can inject a specially crafted SBH rather than fiddling with "synchronous init" and "fail initial download" flags. Since the TestProfileSyncService no longer needs to support the wide variety of test scenarios required by the tests in profile_sync_service_unittest.cc, we can greatly simplify its implementation. Many of its parameters and associated code have been removed. BUG=140354, 312994 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=238348

Patch Set 1 #

Total comments: 3

Patch Set 2 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+129 lines, -519 lines) Patch
M chrome/browser/sync/profile_sync_service.h View 1 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/sync/profile_sync_service.cc View 1 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_autofill_unittest.cc View 1 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_password_unittest.cc View 1 3 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_preference_unittest.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_session_unittest.cc View 1 3 chunks +5 lines, -6 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_typed_url_unittest.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_unittest.cc View 13 chunks +41 lines, -226 lines 0 comments Download
M chrome/browser/sync/test_profile_sync_service.h View 1 6 chunks +6 lines, -83 lines 0 comments Download
M chrome/browser/sync/test_profile_sync_service.cc View 8 chunks +16 lines, -147 lines 0 comments Download
M chrome/browser/ui/sync/one_click_signin_helper_unittest.cc View 1 chunk +1 line, -2 lines 0 comments Download
M sync/internal_api/public/test/sync_manager_factory_for_profile_sync_test.h View 1 chunk +1 line, -3 lines 0 comments Download
M sync/internal_api/test/sync_manager_factory_for_profile_sync_test.cc View 2 chunks +3 lines, -6 lines 0 comments Download
M sync/internal_api/test/sync_manager_for_profile_sync_test.h View 1 chunk +1 line, -3 lines 0 comments Download
M sync/internal_api/test/sync_manager_for_profile_sync_test.cc View 2 chunks +9 lines, -15 lines 0 comments Download
M sync/js/sync_js_controller_unittest.cc View 4 chunks +38 lines, -17 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
rlarocque
Here's another test refactoring patch. Please review. https://codereview.chromium.org/67683005/diff/1/chrome/browser/sync/profile_sync_service_unittest.cc File chrome/browser/sync/profile_sync_service_unittest.cc (right): https://codereview.chromium.org/67683005/diff/1/chrome/browser/sync/profile_sync_service_unittest.cc#newcode87 chrome/browser/sync/profile_sync_service_unittest.cc:87: class ProfileSyncServiceTest ...
7 years, 1 month ago (2013-11-19 20:41:09 UTC) #1
rlarocque
On 2013/11/19 20:41:09, rlarocque wrote: > Here's another test refactoring patch. Please review. > > ...
7 years, 1 month ago (2013-11-22 21:23:01 UTC) #2
rlarocque
+Pavel
7 years ago (2013-11-25 18:22:32 UTC) #3
rlarocque
On 2013/11/25 18:22:32, rlarocque wrote: > +Pavel ping.
7 years ago (2013-11-27 21:56:17 UTC) #4
tim (not reviewing)
On 2013/11/27 21:56:17, rlarocque wrote: > On 2013/11/25 18:22:32, rlarocque wrote: > > +Pavel > ...
7 years ago (2013-11-27 22:32:30 UTC) #5
pavely
LGTM with small comment. https://codereview.chromium.org/67683005/diff/1/chrome/browser/sync/profile_sync_service_unittest.cc File chrome/browser/sync/profile_sync_service_unittest.cc (right): https://codereview.chromium.org/67683005/diff/1/chrome/browser/sync/profile_sync_service_unittest.cc#newcode32 chrome/browser/sync/profile_sync_service_unittest.cc:32: ACTION(ReturnNewDataTypeManager) { I don't think ...
7 years ago (2013-12-02 19:00:55 UTC) #6
rlarocque
Re: Tim's comment I don't think we've lost any meaningful coverage of the sync backend ...
7 years ago (2013-12-02 21:08:58 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/67683005/100001
7 years ago (2013-12-02 22:47:02 UTC) #8
commit-bot: I haz the power
Retried try job too often on mac_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&number=195634
7 years ago (2013-12-03 01:05: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/67683005/100001
7 years ago (2013-12-03 01:06:32 UTC) #10
commit-bot: I haz the power
7 years ago (2013-12-03 11:28:51 UTC) #11
Message was sent while issue was closed.
Change committed as 238348

Powered by Google App Engine
This is Rietveld 408576698