Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1316)

Unified Diff: chrome/browser/first_run/first_run_unittest.cc

Issue 2919223002: [Cleanup] Remove the obsolete variations_seed pref. (Closed)
Patch Set: Fix the test Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/first_run/first_run_unittest.cc
diff --git a/chrome/browser/first_run/first_run_unittest.cc b/chrome/browser/first_run/first_run_unittest.cc
index 93873d705a0c882c899e809c763d911e1f4547eb..bac8e1dd2ff44dd2442344dc92954ac808395aa6 100644
--- a/chrome/browser/first_run/first_run_unittest.cc
+++ b/chrome/browser/first_run/first_run_unittest.cc
@@ -27,12 +27,13 @@ class FirstRunTest : public testing::Test {
};
TEST_F(FirstRunTest, SetupMasterPrefsFromInstallPrefs_VariationsSeed) {
- installer::MasterPreferences install_prefs("{ \"variations_seed\":\"xyz\" }");
+ installer::MasterPreferences install_prefs(
+ "{\"variations_compressed_seed\":\"xyz\"}");
EXPECT_EQ(1U, install_prefs.master_dictionary().size());
MasterPrefs out_prefs;
internal::SetupMasterPrefsFromInstallPrefs(install_prefs, &out_prefs);
- EXPECT_EQ("xyz", out_prefs.variations_seed);
+ EXPECT_EQ("xyz", out_prefs.compressed_variations_seed);
// Variations prefs should have been extracted (removed) from the dictionary.
EXPECT_TRUE(install_prefs.master_dictionary().empty());
}
@@ -43,18 +44,19 @@ TEST_F(FirstRunTest, SetupMasterPrefsFromInstallPrefs_NoVariationsSeed) {
MasterPrefs out_prefs;
internal::SetupMasterPrefsFromInstallPrefs(install_prefs, &out_prefs);
- EXPECT_TRUE(out_prefs.variations_seed.empty());
+ EXPECT_TRUE(out_prefs.compressed_variations_seed.empty());
EXPECT_TRUE(out_prefs.variations_seed_signature.empty());
}
TEST_F(FirstRunTest, SetupMasterPrefsFromInstallPrefs_VariationsSeedSignature) {
installer::MasterPreferences install_prefs(
- "{ \"variations_seed\":\"xyz\", \"variations_seed_signature\":\"abc\" }");
+ "{\"variations_compressed_seed\":\"xyz\","
+ " \"variations_seed_signature\":\"abc\"}");
EXPECT_EQ(2U, install_prefs.master_dictionary().size());
MasterPrefs out_prefs;
internal::SetupMasterPrefsFromInstallPrefs(install_prefs, &out_prefs);
- EXPECT_EQ("xyz", out_prefs.variations_seed);
+ EXPECT_EQ("xyz", out_prefs.compressed_variations_seed);
EXPECT_EQ("abc", out_prefs.variations_seed_signature);
// Variations prefs should have been extracted (removed) from the dictionary.
EXPECT_TRUE(install_prefs.master_dictionary().empty());

Powered by Google App Engine
This is Rietveld 408576698