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

Unified Diff: chrome/installer/util/master_preferences_unittest.cc

Issue 1302303002: Remove year+ old migration support of "session.urls_to_restore_on_startup". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pref_service_syncable_unittest
Patch Set: Address comments Created 5 years 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/installer/util/master_preferences_unittest.cc
diff --git a/chrome/installer/util/master_preferences_unittest.cc b/chrome/installer/util/master_preferences_unittest.cc
index f5246865104924da39aac6952807ddc8b4ba3214..de28bbdaf0db0583bf36cf9097ae24971625b54f 100644
--- a/chrome/installer/util/master_preferences_unittest.cc
+++ b/chrome/installer/util/master_preferences_unittest.cc
@@ -418,72 +418,3 @@ TEST_F(MasterPreferencesTest, DontEnforceLegacyCreateAllShortcutsNotSpecified) {
EXPECT_FALSE(do_not_create_quick_launch_shortcut);
EXPECT_FALSE(do_not_create_taskbar_shortcut);
}
-
-TEST_F(MasterPreferencesTest, MigrateOldStartupUrlsPref) {
- static const char kOldMasterPrefs[] =
- "{ \n"
- " \"distribution\": { \n"
- " \"show_welcome_page\": true,\n"
- " \"import_search_engine\": true,\n"
- " \"import_history\": true,\n"
- " \"import_bookmarks\": true\n"
- " },\n"
- " \"session\": {\n"
- " \"urls_to_restore_on_startup\": [\"http://www.google.com\"]\n"
- " }\n"
- "} \n";
-
- const installer::MasterPreferences prefs(kOldMasterPrefs);
- const base::DictionaryValue& master_dictionary =
- prefs.master_dictionary();
-
- const base::ListValue* old_startup_urls_list = NULL;
- EXPECT_TRUE(master_dictionary.GetList(prefs::kURLsToRestoreOnStartupOld,
- &old_startup_urls_list));
- EXPECT_TRUE(old_startup_urls_list != NULL);
-
- // The MasterPreferences dictionary should also conjure up the new setting
- // as per EnforceLegacyPreferences.
- const base::ListValue* new_startup_urls_list = NULL;
- EXPECT_TRUE(master_dictionary.GetList(prefs::kURLsToRestoreOnStartup,
- &new_startup_urls_list));
- EXPECT_TRUE(new_startup_urls_list != NULL);
-}
-
-TEST_F(MasterPreferencesTest, DontMigrateOldStartupUrlsPrefWhenNewExists) {
- static const char kOldAndNewMasterPrefs[] =
- "{ \n"
- " \"distribution\": { \n"
- " \"show_welcome_page\": true,\n"
- " \"import_search_engine\": true,\n"
- " \"import_history\": true,\n"
- " \"import_bookmarks\": true\n"
- " },\n"
- " \"session\": {\n"
- " \"urls_to_restore_on_startup\": [\"http://www.google.com\"],\n"
- " \"startup_urls\": [\"http://www.example.com\"]\n"
- " }\n"
- "} \n";
-
- const installer::MasterPreferences prefs(kOldAndNewMasterPrefs);
- const base::DictionaryValue& master_dictionary =
- prefs.master_dictionary();
-
- const base::ListValue* old_startup_urls_list = NULL;
- EXPECT_TRUE(master_dictionary.GetList(prefs::kURLsToRestoreOnStartupOld,
- &old_startup_urls_list));
- ASSERT_TRUE(old_startup_urls_list != NULL);
- std::string url_value;
- EXPECT_TRUE(old_startup_urls_list->GetString(0, &url_value));
- EXPECT_EQ("http://www.google.com", url_value);
-
- // The MasterPreferences dictionary should also conjure up the new setting
- // as per EnforceLegacyPreferences.
- const base::ListValue* new_startup_urls_list = NULL;
- EXPECT_TRUE(master_dictionary.GetList(prefs::kURLsToRestoreOnStartup,
- &new_startup_urls_list));
- ASSERT_TRUE(new_startup_urls_list != NULL);
- std::string new_url_value;
- EXPECT_TRUE(new_startup_urls_list->GetString(0, &new_url_value));
- EXPECT_EQ("http://www.example.com", new_url_value);
-}

Powered by Google App Engine
This is Rietveld 408576698