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

Unified Diff: chrome/browser/protector/prefs_backup_invalid_change_unittest.cc

Issue 10717005: Fix: PrefsBackupInvalidChangeTest.Defaults on Mac Lion. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/protector/prefs_backup_invalid_change_unittest.cc
diff --git a/chrome/browser/protector/prefs_backup_invalid_change_unittest.cc b/chrome/browser/protector/prefs_backup_invalid_change_unittest.cc
index 17b21cee08c1555922882e4ff786315f37b7657c..b263cffa2232c501ee83579c59ad060dc3a928cf 100644
--- a/chrome/browser/protector/prefs_backup_invalid_change_unittest.cc
+++ b/chrome/browser/protector/prefs_backup_invalid_change_unittest.cc
@@ -29,10 +29,11 @@ class PrefsBackupInvalidChangeTest : public testing::Test {
// Test that correct default values are applied by Init.
TEST_F(PrefsBackupInvalidChangeTest, Defaults) {
-#if defined(OS_MACOSX)
- if (base::mac::IsOSLionOrLater())
- FAIL() << "Broken after r142958; http://crbug.com/134186";
-#endif
+ // Make the test independent of the Mac startup pref migration (see
+ // SessionStartupPref::MigrateMacDefaultPrefIfNecessary).
+ PrefService* prefs = profile_.GetPrefs();
+ prefs->SetString(prefs::kProfileCreatedByVersion, "22.0.0.0.0");
Ivan Korotkov 2012/06/28 09:53:50 Maybe move this to SetUp?
marja 2012/06/28 11:14:50 Done.
+
SessionStartupPref startup_pref(SessionStartupPref::URLS);
startup_pref.urls.push_back(GURL(kStartupUrl));
SessionStartupPref::SetStartupPref(&profile_, startup_pref);
@@ -48,7 +49,6 @@ TEST_F(PrefsBackupInvalidChangeTest, Defaults) {
EXPECT_EQ(1UL, new_startup_pref.urls.size());
EXPECT_EQ(std::string(kStartupUrl), new_startup_pref.urls[0].spec());
// Homepage prefs are reset to defaults.
- PrefService* prefs = profile_.GetPrefs();
EXPECT_FALSE(prefs->HasPrefPath(prefs::kHomePageIsNewTabPage));
EXPECT_FALSE(prefs->HasPrefPath(prefs::kHomePage));
EXPECT_FALSE(prefs->HasPrefPath(prefs::kShowHomeButton));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698