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

Unified Diff: chrome/browser/prefs/session_startup_pref_unittest.cc

Issue 1312693005: Remove migration of obsolete value for "session.restore_on_startup". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@url-to-restore-on-startup
Patch Set: Remove unused free function Created 5 years, 4 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/prefs/session_startup_pref_unittest.cc
diff --git a/chrome/browser/prefs/session_startup_pref_unittest.cc b/chrome/browser/prefs/session_startup_pref_unittest.cc
index 06dc1bff26a6782de34d8fecfaf4daf4cea92e40..92bef1decdc122ef6a595a6057081bd06dfe872a 100644
--- a/chrome/browser/prefs/session_startup_pref_unittest.cc
+++ b/chrome/browser/prefs/session_startup_pref_unittest.cc
@@ -117,42 +117,3 @@ TEST_F(SessionStartupPrefTest, DefaultMigrationHomepageIsNTP) {
// The "URLs to restore on startup" shouldn't get migrated.
EXPECT_EQ(0U, pref.urls.size());
}
-
-// Checks to make sure that if the user had previously selected "Open the
-// "homepage", their preferences are migrated on upgrade to M19.
-TEST_F(SessionStartupPrefTest, HomePageMigration) {
- registry()->RegisterStringPref(prefs::kHomePage, "http://google.com/");
-
- // By design, it's impossible to set the 'restore on startup' pref to 0
- // ("open the homepage") using SessionStartupPref::SetStartupPref(), so set it
- // using the pref service directly.
- pref_service_->SetInteger(prefs::kRestoreOnStartup, /*kPrefValueHomePage*/ 0);
- pref_service_->SetString(prefs::kHomePage, "http://chromium.org/");
- pref_service_->SetBoolean(prefs::kHomePageIsNewTabPage, false);
-
- SessionStartupPref pref = SessionStartupPref::GetStartupPref(
- pref_service_.get());
-
- EXPECT_EQ(SessionStartupPref::URLS, pref.type);
- EXPECT_EQ(1U, pref.urls.size());
- EXPECT_EQ(GURL("http://chromium.org/"), pref.urls[0]);
-}
-
-// Checks to make sure that if the user had previously selected "Open the
-// "homepage", and the NTP is being used for the homepage, their preferences
-// are migrated on upgrade to M19.
-TEST_F(SessionStartupPrefTest, HomePageMigrationHomepageIsNTP) {
- registry()->RegisterStringPref(prefs::kHomePage, "http://google.com/");
-
- // By design, it's impossible to set the 'restore on startup' pref to 0
- // ("open the homepage") using SessionStartupPref::SetStartupPref(), so set it
- // using the pref service directly.
- pref_service_->SetInteger(prefs::kRestoreOnStartup, /*kPrefValueHomePage*/ 0);
- pref_service_->SetString(prefs::kHomePage, "http://chromium.org/");
- pref_service_->SetBoolean(prefs::kHomePageIsNewTabPage, true);
-
- SessionStartupPref pref = SessionStartupPref::GetStartupPref(
- pref_service_.get());
-
- EXPECT_EQ(SessionStartupPref::DEFAULT, pref.type);
-}

Powered by Google App Engine
This is Rietveld 408576698