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

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

Issue 5915006: Remove user-related data from local_state and add to user_preferences, i... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: svn pset Created 9 years, 11 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/pref_service_uitest.cc
===================================================================
--- chrome/browser/prefs/pref_service_uitest.cc (revision 71191)
+++ chrome/browser/prefs/pref_service_uitest.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -33,13 +33,16 @@
test_data_directory_
.AppendASCII("profiles")
.AppendASCII("window_placement")
- .Append(chrome::kLocalStateFilename);
+ .AppendASCII("Default")
+ .Append(chrome::kPreferencesFilename);
- tmp_pref_file_ = tmp_profile_.Append(chrome::kLocalStateFilename);
+ tmp_pref_file_ = tmp_profile_.AppendASCII("Default");
+ ASSERT_TRUE(file_util::CreateDirectory(tmp_pref_file_));
+
+ tmp_pref_file_ = tmp_pref_file_.Append(chrome::kPreferencesFilename);
ASSERT_TRUE(file_util::PathExists(reference_pref_file));
-
- // Copy only the Local State file, the rest will be automatically created
+ // Copy only the Preferences file, the rest will be automatically created.
ASSERT_TRUE(file_util::CopyFile(reference_pref_file, tmp_pref_file_));
#if defined(OS_WIN)
@@ -70,18 +73,15 @@
FilePath tmp_profile_;
};
-#if defined(OS_WIN)
+#if !defined(OS_LINUX)
// This test verifies that the window position from the prefs file is restored
// when the app restores. This doesn't really make sense on Linux, where
// the window manager might fight with you over positioning. However, we
// might be able to make this work on buildbots.
-// Also, not sure what should happen on the mac. In any case, the code below
-// (minus the Windows bits) compiles fine on my Linux box now.
// TODO(port): revisit this.
TEST_F(PreferenceServiceTest, PreservedWindowPlacementIsLoaded) {
// The window should open with the reference profile
ASSERT_TRUE(LaunchAppWithProfile());
-
ASSERT_TRUE(file_util::PathExists(tmp_pref_file_));
JSONFileValueSerializer deserializer(tmp_pref_file_);

Powered by Google App Engine
This is Rietveld 408576698