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_); |