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

Side by Side Diff: chrome/browser/prefs/pref_service_browsertest.cc

Issue 100573002: Move directory creation functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/json/json_file_value_serializer.h" 10 #include "base/json/json_file_value_serializer.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 base::FilePath reference_pref_file; 68 base::FilePath reference_pref_file;
69 if (new_profile_) { 69 if (new_profile_) {
70 reference_pref_file = ui_test_utils::GetTestFilePath( 70 reference_pref_file = ui_test_utils::GetTestFilePath(
71 base::FilePath().AppendASCII("profiles"). 71 base::FilePath().AppendASCII("profiles").
72 AppendASCII("window_placement"). 72 AppendASCII("window_placement").
73 AppendASCII("Default"), 73 AppendASCII("Default"),
74 base::FilePath().Append(chrome::kPreferencesFilename)); 74 base::FilePath().Append(chrome::kPreferencesFilename));
75 tmp_pref_file_ = 75 tmp_pref_file_ =
76 user_data_directory.AppendASCII(TestingProfile::kTestUserProfileDir); 76 user_data_directory.AppendASCII(TestingProfile::kTestUserProfileDir);
77 CHECK(file_util::CreateDirectory(tmp_pref_file_)); 77 CHECK(base::CreateDirectory(tmp_pref_file_));
78 tmp_pref_file_ = tmp_pref_file_.Append(chrome::kPreferencesFilename); 78 tmp_pref_file_ = tmp_pref_file_.Append(chrome::kPreferencesFilename);
79 } else { 79 } else {
80 reference_pref_file = ui_test_utils::GetTestFilePath( 80 reference_pref_file = ui_test_utils::GetTestFilePath(
81 base::FilePath().AppendASCII("profiles"). 81 base::FilePath().AppendASCII("profiles").
82 AppendASCII("window_placement"), 82 AppendASCII("window_placement"),
83 base::FilePath().Append(chrome::kLocalStateFilename)); 83 base::FilePath().Append(chrome::kLocalStateFilename));
84 tmp_pref_file_ = user_data_directory.Append(chrome::kLocalStateFilename); 84 tmp_pref_file_ = user_data_directory.Append(chrome::kLocalStateFilename);
85 } 85 }
86 86
87 CHECK(base::PathExists(reference_pref_file)); 87 CHECK(base::PathExists(reference_pref_file));
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 EXPECT_EQ(right, bounds.x() + bounds.width()); 225 EXPECT_EQ(right, bounds.x() + bounds.width());
226 226
227 // Find if launched window is maximized. 227 // Find if launched window is maximized.
228 bool is_window_maximized = browser()->window()->IsMaximized(); 228 bool is_window_maximized = browser()->window()->IsMaximized();
229 bool is_maximized = false; 229 bool is_maximized = false;
230 EXPECT_TRUE(root_dict->GetBoolean(kBrowserWindowPlacement + ".maximized", 230 EXPECT_TRUE(root_dict->GetBoolean(kBrowserWindowPlacement + ".maximized",
231 &is_maximized)); 231 &is_maximized));
232 EXPECT_EQ(is_maximized, is_window_maximized); 232 EXPECT_EQ(is_maximized, is_window_maximized);
233 } 233 }
234 #endif 234 #endif
OLDNEW
« no previous file with comments | « chrome/browser/prefs/pref_functional_browsertest.cc ('k') | chrome/browser/printing/printing_layout_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698