Reland 2: sync_integration_tests: don't instantiate ScopedFeatureList in test body

This is a reland of https://crrev.com/c/1402799 and
https://crrev.com/c/1402890, which were reverted for supposedly
introducing flakiness, but in fact in only renamed already-flaky tests.
Hopefully all such tests are now disabled, so trying again.

Creating a ScopedFeatureList instance in the test body creates a data
race related to the global FeatureList instance: The ScopedFeatureList
overrides the global instance, and then it gets reset after the test
body; however, the feature list might still be queried from the Sync
thread after that.

This CL avoids the issue by instead creating test (sub)classes to hold
the ScopedFeatureLists.

Bug: 915219
Change-Id: I193a5174a74fcf89e9dc1593ee5cdb6eae570ad3
Reviewed-on: https://chromium-review.googlesource.com/c/1406999
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622397}
5 files changed