|
|
[Sync] Add a sanity integration test for USS.
This integration test overwrites the PREFERENCES data type to use a fake
ModelTypeService implementation. This is done using two new static
calls:
- ProfileSyncComponentsFactoryImpl::OverridePrefsForUssTest to force
PREFERENCES to be registered as a USS type (with a
ModelTypeController).
- ProfileSyncServiceFactory::SetSyncClientFactoryForTest to override the
SyncClient that the real ProfileSyncService uses so that the
ModelTypeService can be injected.
Additionally, this change fixes an issue with deletions under USS that
was uncovered while writing it. The specifics used for a deleted entity
must have ByteSize() == 0 for it to be detected as a deletion, but we
were setting it to the one sent by the server, which has ByteSize() ==
4 so the model type can be extracted from it.
BUG= 643269
Committed: https://crrev.com/a1d69879d0c74f5edae8cb1a942ff6538fe398cb
Cr-Commit-Position: refs/heads/master@{#418404}
Total comments: 43
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+335 lines, -62 lines) |
Patch |
 |
M |
chrome/browser/sync/profile_sync_service_factory.h
|
View
|
|
4 chunks |
+11 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/profile_sync_service_factory.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+16 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/test/integration/single_client_bookmarks_sync_test.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/test/integration/single_client_extensions_sync_test.cc
|
View
|
1
2
3
4
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
A |
chrome/browser/sync/test/integration/two_client_uss_sync_test.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+195 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/test/BUILD.gn
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/browser_sync/browser/profile_sync_components_factory_impl.h
|
View
|
1
2
3
4
|
2 chunks |
+7 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/browser_sync/browser/profile_sync_components_factory_impl.cc
|
View
|
1
2
3
4
|
2 chunks |
+17 lines, -3 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine_impl/model_type_worker.cc
|
View
|
1
2
3
4
|
1 chunk |
+6 lines, -1 line |
0 comments
|
Download
|
 |
M |
components/sync/engine_impl/worker_entity_tracker.h
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/sync/test/fake_server/android/fake_server_helper_android.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
components/sync/test/fake_server/bookmark_entity.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
components/sync/test/fake_server/fake_server.cc
|
View
|
1
2
3
4
5
6
|
13 chunks |
+20 lines, -18 lines |
0 comments
|
Download
|
 |
M |
components/sync/test/fake_server/fake_server_entity.h
|
View
|
1
2
3
4
|
3 chunks |
+11 lines, -4 lines |
0 comments
|
Download
|
 |
M |
components/sync/test/fake_server/fake_server_entity.cc
|
View
|
1
2
3
4
5
6
|
3 chunks |
+11 lines, -9 lines |
0 comments
|
Download
|
 |
M |
components/sync/test/fake_server/permanent_entity.cc
|
View
|
1
2
3
4
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
components/sync/test/fake_server/tombstone_entity.h
|
View
|
1
2
3
4
|
2 chunks |
+6 lines, -2 lines |
0 comments
|
Download
|
 |
M |
components/sync/test/fake_server/tombstone_entity.cc
|
View
|
1
2
3
4
|
1 chunk |
+9 lines, -4 lines |
0 comments
|
Download
|
 |
M |
components/sync/test/fake_server/unique_client_entity.h
|
View
|
1
2
3
4
|
2 chunks |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
components/sync/test/fake_server/unique_client_entity.cc
|
View
|
1
2
3
4
|
4 chunks |
+10 lines, -8 lines |
0 comments
|
Download
|
Total messages: 44 (34 generated)
|