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

Issue 10874096: [Sync] Rework Invalidator-related unit tests (Closed)

Created:
8 years, 3 months ago by akalin
Modified:
8 years, 3 months ago
Reviewers:
Nicolas Zea
CC:
chromium-reviews, Raghu Simha, ncarter (slow), akalin, tim (not reviewing), dcheng
Visibility:
Public.

Description

[Sync] Rework Invalidator-related unit tests Introduce invalidator_test_template.h, which contains tests that should be used for each Invalidator implementation. Make all Invalidator implementations, and also InvalidatorRegistrar, instantiate that test template. Move most InvalidatorRegistrar tests and some of the other Invalidator implementation tests to the template. Make P2PInvalidator support arbitrary object IDs. Also make SendInvalidation take an ObjectIdStateMap. Simplify BridgedInvalidator a bit; it no longer requires a call to UpdateEnabledTypes (it just uses all registered types from its registrar). Rework tests for BridgedInvalidator/ChromeSyncNotifierBridge to not require functions in ChromeSyncNotifierBridge to be marked virtual. Add conversions to/from Values for InvalidationState, ObjectId, and ObjectIdStateMap. BUG=141678 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=154538

Patch Set 1 #

Patch Set 2 : Sync to head #

Patch Set 3 : Fix compile #

Total comments: 32

Patch Set 4 : Address comments #

Patch Set 5 : Fix one more #

Total comments: 4

Patch Set 6 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1428 lines, -753 lines) Patch
M chrome/browser/sync/glue/bridged_invalidator.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/glue/bridged_invalidator.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/glue/bridged_invalidator_unittest.cc View 1 2 3 1 chunk +128 lines, -55 lines 0 comments Download
M chrome/browser/sync/glue/chrome_sync_notification_bridge.h View 1 2 chunks +9 lines, -7 lines 0 comments Download
M chrome/browser/sync/glue/chrome_sync_notification_bridge.cc View 1 7 chunks +50 lines, -29 lines 0 comments Download
M chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc View 1 2 3 4 5 9 chunks +69 lines, -137 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host.cc View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/sync/test/integration/sync_test.cc View 1 2 1 chunk +6 lines, -3 lines 0 comments Download
M sync/internal_api/public/base/invalidation_state.h View 1 2 3 1 chunk +20 lines, -0 lines 0 comments Download
A sync/internal_api/public/base/invalidation_state.cc View 1 2 3 1 chunk +42 lines, -0 lines 0 comments Download
M sync/internal_api/public/base/model_type_state_map.h View 1 chunk +3 lines, -3 lines 0 comments Download
M sync/internal_api/sync_manager_impl.cc View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M sync/notifier/fake_invalidator.h View 1 3 chunks +8 lines, -3 lines 0 comments Download
M sync/notifier/fake_invalidator.cc View 1 3 chunks +24 lines, -9 lines 0 comments Download
A sync/notifier/fake_invalidator_unittest.cc View 1 1 chunk +70 lines, -0 lines 0 comments Download
M sync/notifier/invalidation_notifier.h View 1 1 chunk +1 line, -1 line 0 comments Download
M sync/notifier/invalidation_notifier.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M sync/notifier/invalidation_notifier_unittest.cc View 1 1 chunk +48 lines, -95 lines 0 comments Download
M sync/notifier/invalidation_util.h View 1 2 3 4 2 chunks +14 lines, -2 lines 0 comments Download
M sync/notifier/invalidation_util.cc View 1 2 3 4 3 chunks +32 lines, -10 lines 0 comments Download
M sync/notifier/invalidator.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M sync/notifier/invalidator_registrar.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M sync/notifier/invalidator_registrar.cc View 1 2 chunks +13 lines, -13 lines 0 comments Download
M sync/notifier/invalidator_registrar_unittest.cc View 1 2 3 4 chunks +94 lines, -200 lines 0 comments Download
A sync/notifier/invalidator_test_template.h View 1 2 3 1 chunk +404 lines, -0 lines 0 comments Download
M sync/notifier/non_blocking_invalidator.h View 1 1 chunk +1 line, -1 line 0 comments Download
M sync/notifier/non_blocking_invalidator.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M sync/notifier/non_blocking_invalidator_unittest.cc View 1 2 3 4 5 1 chunk +59 lines, -59 lines 0 comments Download
M sync/notifier/notifications_disabled_reason.h View 1 chunk +3 lines, -0 lines 0 comments Download
M sync/notifier/notifications_disabled_reason.cc View 1 chunk +15 lines, -0 lines 0 comments Download
M sync/notifier/object_id_state_map.h View 1 2 3 2 chunks +14 lines, -0 lines 0 comments Download
M sync/notifier/object_id_state_map.cc View 1 2 3 4 2 chunks +61 lines, -0 lines 0 comments Download
M sync/notifier/p2p_invalidator.h View 1 5 chunks +11 lines, -8 lines 0 comments Download
M sync/notifier/p2p_invalidator.cc View 1 2 3 12 chunks +58 lines, -45 lines 0 comments Download
M sync/notifier/p2p_invalidator_unittest.cc View 1 15 chunks +152 lines, -58 lines 0 comments Download
M sync/sync.gyp View 1 2 3 8 chunks +5 lines, -4 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
akalin
And the lucky winner is +zea for review! +dcheng fyi
8 years, 3 months ago (2012-08-29 00:47:00 UTC) #1
Nicolas Zea
Whew, first round comments. http://codereview.chromium.org/10874096/diff/11001/chrome/browser/sync/glue/bridged_invalidator_unittest.cc File chrome/browser/sync/glue/bridged_invalidator_unittest.cc (right): http://codereview.chromium.org/10874096/diff/11001/chrome/browser/sync/glue/bridged_invalidator_unittest.cc#newcode35 chrome/browser/sync/glue/bridged_invalidator_unittest.cc:35: } // namespace remove anon ...
8 years, 3 months ago (2012-08-29 23:41:05 UTC) #2
akalin
PTAL! http://codereview.chromium.org/10874096/diff/11001/chrome/browser/sync/glue/bridged_invalidator_unittest.cc File chrome/browser/sync/glue/bridged_invalidator_unittest.cc (right): http://codereview.chromium.org/10874096/diff/11001/chrome/browser/sync/glue/bridged_invalidator_unittest.cc#newcode35 chrome/browser/sync/glue/bridged_invalidator_unittest.cc:35: } // namespace On 2012/08/29 23:41:05, nzea wrote: ...
8 years, 3 months ago (2012-08-30 22:20:38 UTC) #3
Nicolas Zea
LGTM! http://codereview.chromium.org/10874096/diff/18002/chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc File chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc (right): http://codereview.chromium.org/10874096/diff/18002/chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc#newcode36 chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc:36: // Since all the interesting stuff happens on ...
8 years, 3 months ago (2012-08-31 17:44:25 UTC) #4
akalin
Committing via commit bot. http://codereview.chromium.org/10874096/diff/18002/chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc File chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc (right): http://codereview.chromium.org/10874096/diff/18002/chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc#newcode36 chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc:36: // Since all the interesting ...
8 years, 3 months ago (2012-08-31 21:06:33 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/akalin@chromium.org/10874096/23008
8 years, 3 months ago (2012-08-31 21:12:17 UTC) #6
commit-bot: I haz the power
8 years, 3 months ago (2012-08-31 23:39:29 UTC) #7
Change committed as 154538

Powered by Google App Engine
This is Rietveld 408576698