Add browsertests for Variations Safe Mode.

As discussed here [1], we should have a test that sets up prefs in one
session and then verifies the next session's behavior.

[1] https://groups.google.com/a/chromium.org/g/chromium-dev/c/4w1nEcXcIcs/m/ejabKLSKAQAJ

Bug: b/184937096
Change-Id: If7bea76b167f93a3bff4a8ca5d98e054b363411c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2941224
Commit-Queue: Caitlin Fischer <[email protected]>
Reviewed-by: Steven Holte <[email protected]>
Cr-Commit-Position: refs/heads/master@{#896782}
diff --git a/components/variations/variations_test_utils.cc b/components/variations/variations_test_utils.cc
index dd6aaf2..af1620c 100644
--- a/components/variations/variations_test_utils.cc
+++ b/components/variations/variations_test_utils.cc
@@ -4,16 +4,31 @@
 
 #include "components/variations/variations_test_utils.h"
 
-#include <string>
-
 #include "base/base64.h"
+#include "base/command_line.h"
 #include "base/feature_list.h"
-#include "base/metrics/field_trial.h"
 #include "components/variations/proto/client_variations.pb.h"
 #include "components/variations/variations_associated_data.h"
+#include "components/variations/variations_switches.h"
 
 namespace variations {
 
+const char kUncompressedBase64TestSeedData[] =
+    "CigxZDI5NDY0ZmIzZDc4ZmYxNTU2ZTViNTUxYzY0NDdjYmM3NGU1ZmQwEr0BCh9VTUEtVW5p"
+    "Zm9ybWl0eS1UcmlhbC0xMC1QZXJjZW50GICckqUFOAFCB2RlZmF1bHRKCwoHZGVmYXVsdBAB"
+    "SgwKCGdyb3VwXzAxEAFKDAoIZ3JvdXBfMDIQAUoMCghncm91cF8wMxABSgwKCGdyb3VwXzA0"
+    "EAFKDAoIZ3JvdXBfMDUQAUoMCghncm91cF8wNhABSgwKCGdyb3VwXzA3EAFKDAoIZ3JvdXBf"
+    "MDgQAUoMCghncm91cF8wORAB";
+
+const char kBase64TestSeedSignature[] =
+    "MEQCIDD1IVxjzWYncun+9IGzqYjZvqxxujQEayJULTlbTGA/AiAr0oVmEgVUQZBYq5VLOSvy"
+    "96JkMYgzTkHPwbv7K/CmgA==";
+
+void DisableTestingConfig() {
+  base::CommandLine::ForCurrentProcess()->AppendSwitch(
+      switches::kDisableFieldTrialTestingConfig);
+}
+
 bool ExtractVariationIds(const std::string& variations,
                          std::set<VariationID>* variation_ids,
                          std::set<VariationID>* trigger_ids) {
@@ -49,4 +64,4 @@
   return trial;
 }
 
-}  // namespace variations
\ No newline at end of file
+}  // namespace variations