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

Issue 151963002: Remove duplicated code from sync related unit tests. (Closed)

Created:
6 years, 10 months ago by maniscalco
Modified:
6 years, 10 months ago
CC:
chromium-reviews, tim+watch_chromium.org, extensions-reviews_chromium.org, haitaol+watch_chromium.org, rpetterson, browser-components-watch_chromium.org, rouslan+spellwatch_chromium.org, pam+watch_chromium.org, groby+spellwatch_chromium.org, chromium-apps-reviews_chromium.org, rsimha+watch_chromium.org, maniscalco+watch_chromium.org, Pete Williamson
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Remove duplicated code from sync related unit tests. Consolidate the various implementations of SyncChangeProcessorDelegate and fake into sync/api. Replace many of the fake SyncChangeProcessor implementations with a slightly more advanced FakeSyncChangeProcessor. TBR=brettw@chromium.org BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=251926

Patch Set 1 : Using delegate pattern. #

Patch Set 2 : managed_user_shared_settings_service_unittest.cc now uses a delegate #

Patch Set 3 : Rename SyncChangeProcessorDelgate to SyncChangeProcessorDelgator. #

Total comments: 12

Patch Set 4 : Apply CR feedback and git cl format. #

Patch Set 5 : Merged with master. #

Patch Set 6 : Use wrapper for a GTK specific test. #

Patch Set 7 : Removed a const qualifier. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+697 lines, -868 lines) Patch
M chrome/browser/extensions/api/storage/settings_apitest.cc View 1 2 3 5 chunks +15 lines, -52 lines 0 comments Download
M chrome/browser/extensions/api/storage/settings_sync_unittest.cc View 1 2 3 24 chunks +40 lines, -62 lines 0 comments Download
M chrome/browser/extensions/extension_service_unittest.cc View 1 2 3 4 18 chunks +81 lines, -63 lines 0 comments Download
M chrome/browser/history/history_unittest.cc View 1 2 3 7 chunks +36 lines, -89 lines 0 comments Download
M chrome/browser/history/typed_url_syncable_service_unittest.cc View 1 2 3 22 chunks +66 lines, -115 lines 0 comments Download
M chrome/browser/managed_mode/managed_user_settings_service_unittest.cc View 1 2 3 7 chunks +14 lines, -40 lines 0 comments Download
M chrome/browser/managed_mode/managed_user_shared_settings_service_unittest.cc View 1 2 3 9 chunks +15 lines, -43 lines 0 comments Download
M chrome/browser/notifications/extension_welcome_notification_unittest.cc View 1 2 3 4 3 chunks +7 lines, -25 lines 0 comments Download
M chrome/browser/notifications/sync_notifier/chrome_notifier_service_unittest.cc View 1 2 3 4 5 chunks +6 lines, -31 lines 0 comments Download
M chrome/browser/prefs/synced_pref_change_registrar_browsertest.cc View 3 chunks +3 lines, -14 lines 0 comments Download
M chrome/browser/search_engines/template_url_service_sync_unittest.cc View 1 2 3 7 chunks +11 lines, -50 lines 0 comments Download
M chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc View 1 2 3 14 chunks +144 lines, -110 lines 0 comments Download
M chrome/browser/sync/glue/favicon_cache_unittest.cc View 1 2 3 4 chunks +5 lines, -45 lines 0 comments Download
M chrome/browser/themes/theme_syncable_service_unittest.cc View 1 2 3 4 5 6 15 chunks +159 lines, -129 lines 0 comments Download
M sync/api/fake_sync_change_processor.h View 1 chunk +15 lines, -0 lines 0 comments Download
M sync/api/fake_sync_change_processor.cc View 3 chunks +12 lines, -0 lines 0 comments Download
A sync/api/sync_change_processor_wrapper_for_test.h View 1 2 3 1 chunk +38 lines, -0 lines 0 comments Download
A sync/api/sync_change_processor_wrapper_for_test.cc View 1 2 3 1 chunk +28 lines, -0 lines 0 comments Download
M sync/sync_tests.gypi View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
maniscalco
Hi Tim, would you please review this cleanup change?
6 years, 10 months ago (2014-02-03 18:13:26 UTC) #1
maniscalco
https://codereview.chromium.org/151963002/diff/310001/chrome/browser/search_engines/template_url_service_sync_unittest.cc File chrome/browser/search_engines/template_url_service_sync_unittest.cc (right): https://codereview.chromium.org/151963002/diff/310001/chrome/browser/search_engines/template_url_service_sync_unittest.cc#newcode1286 chrome/browser/search_engines/template_url_service_sync_unittest.cc:1286: new syncer::SyncChangeProcessorDelegator(model_b())); Unfortunately, model_b() returns a TemplateURLService*, which makes ...
6 years, 10 months ago (2014-02-03 23:05:50 UTC) #2
tim (not reviewing)
Having a single fake SCP is great, thanks! LGTM with nits https://codereview.chromium.org/151963002/diff/310001/sync/api/sync_change_processor_delegator.h File sync/api/sync_change_processor_delegator.h (right): ...
6 years, 10 months ago (2014-02-06 19:26:47 UTC) #3
groby-ooo-7-16
https://codereview.chromium.org/151963002/diff/310001/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc File chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc (right): https://codereview.chromium.org/151963002/diff/310001/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc#newcode464 chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc:464: custom_dictionary->MergeDataAndStartSyncing( nit: this indentation seems wrong. I'd expect EXPECT_FALSE( ...
6 years, 10 months ago (2014-02-06 19:52:04 UTC) #4
maniscalco
https://codereview.chromium.org/151963002/diff/310001/chrome/browser/search_engines/template_url_service_sync_unittest.cc File chrome/browser/search_engines/template_url_service_sync_unittest.cc (right): https://codereview.chromium.org/151963002/diff/310001/chrome/browser/search_engines/template_url_service_sync_unittest.cc#newcode1286 chrome/browser/search_engines/template_url_service_sync_unittest.cc:1286: new syncer::SyncChangeProcessorDelegator(model_b())); On 2014/02/03 23:05:50, maniscalco wrote: > Unfortunately, ...
6 years, 10 months ago (2014-02-06 20:05:26 UTC) #5
maniscalco
Hi, would you each please review for your area? pkotwicz - c/b/themes stevet - c/b/search_engines ...
6 years, 10 months ago (2014-02-06 21:06:25 UTC) #6
Jeffrey Yasskin
extensions LGTM. Thanks for killing duplicate code!
6 years, 10 months ago (2014-02-06 21:11:49 UTC) #7
dewittj
notifications lgtm, robliao&petewil -> CC
6 years, 10 months ago (2014-02-06 21:19:35 UTC) #8
robliao
On 2014/02/06 21:19:35, dewittj wrote: > notifications lgtm, robliao&petewil -> CC chrome/browser/notifications/extension_welcome_notification_unittest.cc lgtm
6 years, 10 months ago (2014-02-06 21:28:02 UTC) #9
Pete Williamson
changes to synced notification unit tests lgtm assuming all synced notification unit tests pass unit_tests ...
6 years, 10 months ago (2014-02-06 21:31:29 UTC) #10
SteveT
lgtm for search_engines
6 years, 10 months ago (2014-02-06 21:36:06 UTC) #11
groby-ooo-7-16
spellcheck definitely LGTM https://codereview.chromium.org/151963002/diff/310001/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc File chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc (right): https://codereview.chromium.org/151963002/diff/310001/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc#newcode464 chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc:464: custom_dictionary->MergeDataAndStartSyncing( On 2014/02/06 20:05:27, maniscalco wrote: ...
6 years, 10 months ago (2014-02-06 22:03:16 UTC) #12
groby-ooo-7-16
https://codereview.chromium.org/151963002/diff/310001/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc File chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc (right): https://codereview.chromium.org/151963002/diff/310001/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc#newcode464 chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc:464: custom_dictionary->MergeDataAndStartSyncing( On 2014/02/06 22:03:17, groby wrote: > On 2014/02/06 ...
6 years, 10 months ago (2014-02-06 22:16:55 UTC) #13
Bernhard Bauer
managed_mode/ and prefs/ LGTM. Thanks!
6 years, 10 months ago (2014-02-07 07:52:01 UTC) #14
pkotwicz
chrome/browser/themes LGTM
6 years, 10 months ago (2014-02-07 15:03:51 UTC) #15
maniscalco
The CQ bit was checked by maniscalco@chromium.org
6 years, 10 months ago (2014-02-18 18:39:35 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/maniscalco@chromium.org/151963002/670001
6 years, 10 months ago (2014-02-18 18:41:24 UTC) #17
maniscalco
The CQ bit was unchecked by maniscalco@chromium.org
6 years, 10 months ago (2014-02-18 19:33:17 UTC) #18
maniscalco
The CQ bit was checked by maniscalco@chromium.org
6 years, 10 months ago (2014-02-18 19:50:51 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/maniscalco@chromium.org/151963002/890001
6 years, 10 months ago (2014-02-18 19:51:26 UTC) #20
maniscalco
The CQ bit was checked by maniscalco@chromium.org
6 years, 10 months ago (2014-02-18 22:46:13 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/maniscalco@chromium.org/151963002/1030001
6 years, 10 months ago (2014-02-18 22:47:19 UTC) #22
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-18 23:04:45 UTC) #23
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) base_unittests, interactive_ui_tests, net_unittests, unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=265926
6 years, 10 months ago (2014-02-18 23:04:46 UTC) #24
maniscalco
The CQ bit was checked by maniscalco@chromium.org
6 years, 10 months ago (2014-02-19 00:31:32 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/maniscalco@chromium.org/151963002/1030001
6 years, 10 months ago (2014-02-19 00:33:28 UTC) #26
commit-bot: I haz the power
6 years, 10 months ago (2014-02-19 02:15:33 UTC) #27
Message was sent while issue was closed.
Change committed as 251926

Powered by Google App Engine
This is Rietveld 408576698