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

Side by Side Diff: chrome/test/perf/memory_test.cc

Issue 18332014: Move Copy* into the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: windows Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/perf/generate_profile.cc ('k') | chrome/test/perf/perf_ui_test_suite.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 bool SetupTempDirectory(const base::FilePath& src_dir) { 231 bool SetupTempDirectory(const base::FilePath& src_dir) {
232 VLOG(1) << "Setting up temp directory in " << src_dir.value(); 232 VLOG(1) << "Setting up temp directory in " << src_dir.value();
233 // We create a copy of the test dir and use it so that each 233 // We create a copy of the test dir and use it so that each
234 // run of this test starts with the same data. Running this 234 // run of this test starts with the same data. Running this
235 // test has the side effect that it will change the profile. 235 // test has the side effect that it will change the profile.
236 if (!file_util::CreateNewTempDirectory(kTempDirName, &temp_dir_)) { 236 if (!file_util::CreateNewTempDirectory(kTempDirName, &temp_dir_)) {
237 LOG(ERROR) << "Could not create temp directory:" << kTempDirName; 237 LOG(ERROR) << "Could not create temp directory:" << kTempDirName;
238 return false; 238 return false;
239 } 239 }
240 240
241 if (!file_util::CopyDirectory(src_dir, temp_dir_, true)) { 241 if (!base::CopyDirectory(src_dir, temp_dir_, true)) {
242 LOG(ERROR) << "Could not copy temp directory"; 242 LOG(ERROR) << "Could not copy temp directory";
243 return false; 243 return false;
244 } 244 }
245 245
246 // The profile directory was copied in to the containing temp 246 // The profile directory was copied in to the containing temp
247 // directory as its base name, so point user_data_dir_ there. 247 // directory as its base name, so point user_data_dir_ there.
248 user_data_dir_ = temp_dir_.Append(src_dir.BaseName()); 248 user_data_dir_ = temp_dir_.Append(src_dir.BaseName());
249 cleanup_temp_dir_on_exit_ = true; 249 cleanup_temp_dir_on_exit_ = true;
250 VLOG(1) << "Finished temp directory setup."; 250 VLOG(1) << "Finished temp directory setup.";
251 return true; 251 return true;
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 GENERAL_MIX_MEMORY_TESTS(SingleTabTest, 1); 517 GENERAL_MIX_MEMORY_TESTS(SingleTabTest, 1);
518 GENERAL_MIX_MEMORY_TESTS(FiveTabTest, 5); 518 GENERAL_MIX_MEMORY_TESTS(FiveTabTest, 5);
519 GENERAL_MIX_MEMORY_TESTS(TwelveTabTest, 12); 519 GENERAL_MIX_MEMORY_TESTS(TwelveTabTest, 12);
520 520
521 // Commented out until the recorded cache data is added. 521 // Commented out until the recorded cache data is added.
522 //TEST_F(MembusterMemoryTest, Windows) { 522 //TEST_F(MembusterMemoryTest, Windows) {
523 // RunTest("membuster", 0); 523 // RunTest("membuster", 0);
524 //} 524 //}
525 525
526 } // namespace 526 } // namespace
OLDNEW
« no previous file with comments | « chrome/test/perf/generate_profile.cc ('k') | chrome/test/perf/perf_ui_test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698