[search engines] Add sync integration test for deletion of default
This patch adds a sync integration test that exercises a problematic scenario: the deletion of a search engine via sync while the engine is the default one locally. This is possible because the default search engine is sync-ed via preferences, that is, syncer::PREFERENCES, whereas the actual list of search engines is sync-ed via another sync datatype, namely syncer::SEARCH_ENGINES. Ordering across different sync datatypes is not guaranteed and therefore, if a user changes the default search engine and deletes the old one, it is possible that a remote sync-ing device observes this changes in the opposite order. There is logic in TemplateURLService to special-case this scenario to append underscores, and this patch simply documents this behavior using a two-client sync integration test. Because reproducing the precise problematic ordering is not feasible, the test leverages a newly-introduced functionality in FakeServer that allows throttling sync datatypes (resembling a very slow sync for preferences). Change-Id: Ia0929717d0ea99a38969298b94f68a1c1ab44364 Bug: 1022775 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2471398 Commit-Queue: Mikel Astiz <mastiz@chromium.org> Reviewed-by:Maksim Moskvitin <mmoskvitin@google.com> Cr-Commit-Position: refs/heads/master@{#820238}
Showing
Please register or sign in to comment