Clear sets in VariationsHttpHeaderProvider::ResetForTesting

Sets are never cleared in VariationsHttpHeaderProvider.
This means that if VariationsHttpHeaderProvider id initialized in a test
with a GoogleVariationID, the trial will be added to variation_ids_set_
and never be removed even by ResetForTesting.

This make all tests relying on not having X-Client-Header after this
fail.

E.g. on iOS, TranslateScriptTest.CheckScriptParameters fails if it runs
after PaymentClientTest.

Bug: None
Change-Id: I3287f3df846ab1b0f56e42980146b07a3707f7d4
Reviewed-on: https://chromium-review.googlesource.com/c/1256803
Commit-Queue: Olivier Robin <[email protected]>
Reviewed-by: Mark Pearson <[email protected]>
Cr-Commit-Position: refs/heads/master@{#596169}
diff --git a/components/variations/variations_http_header_provider.cc b/components/variations/variations_http_header_provider.cc
index 0b1e4c8..2908461 100644
--- a/components/variations/variations_http_header_provider.cc
+++ b/components/variations/variations_http_header_provider.cc
@@ -116,6 +116,11 @@
   // re-inited. Note: This is a no-op if this is not currently observing.
   base::FieldTrialList::RemoveObserver(this);
   variation_ids_cache_initialized_ = false;
+  variation_ids_set_.clear();
+  default_variation_ids_set_.clear();
+  synthetic_variation_ids_set_.clear();
+  cached_variation_ids_header_.clear();
+  cached_variation_ids_header_signed_in_.clear();
 }
 
 VariationsHttpHeaderProvider::VariationsHttpHeaderProvider()