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

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

Issue 375016: Use GetSwitchValuePath. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 1 month 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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // will be populated with an appropriate cache set. If any of source 76 // will be populated with an appropriate cache set. If any of source
77 // urls are particularly slow, setting |kMaxWaitTime| higher while record 77 // urls are particularly slow, setting |kMaxWaitTime| higher while record
78 // may be useful. 78 // may be useful.
79 bool playback = true; 79 bool playback = true;
80 if (playback) { 80 if (playback) {
81 // Use the playback cache, but don't use playback events. 81 // Use the playback cache, but don't use playback events.
82 launch_arguments_.AppendSwitch(switches::kPlaybackMode); 82 launch_arguments_.AppendSwitch(switches::kPlaybackMode);
83 launch_arguments_.AppendSwitch(switches::kNoEvents); 83 launch_arguments_.AppendSwitch(switches::kNoEvents);
84 84
85 // Get the specified user data dir (optional) 85 // Get the specified user data dir (optional)
86 FilePath profile_dir = FilePath::FromWStringHack( 86 FilePath profile_dir =
87 CommandLine::ForCurrentProcess()->GetSwitchValue( 87 CommandLine::ForCurrentProcess()->GetSwitchValuePath(
88 switches::kUserDataDir)); 88 switches::kUserDataDir);
89 89
90 if (profile_dir.empty()) { 90 if (profile_dir.empty()) {
91 if (!SetupTempDirectory(GetUserDataDirSource())) { 91 if (!SetupTempDirectory(GetUserDataDirSource())) {
92 // There isn't really a way to fail gracefully here. 92 // There isn't really a way to fail gracefully here.
93 // Neither this constructor nor the SetUp() method return 93 // Neither this constructor nor the SetUp() method return
94 // status to the caller. So, just fall through using the 94 // status to the caller. So, just fall through using the
95 // default profile and log this. The failure will be 95 // default profile and log this. The failure will be
96 // obvious. 96 // obvious.
97 LOG(ERROR) << "Error preparing temp directory for test"; 97 LOG(ERROR) << "Error preparing temp directory for test";
98 } 98 }
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 TEST_F(GeneralMixMemoryTest, TwelveTabTest) { 644 TEST_F(GeneralMixMemoryTest, TwelveTabTest) {
645 RunTest("12t", 12); 645 RunTest("12t", 12);
646 } 646 }
647 647
648 // Commented out until the recorded cache data is added. 648 // Commented out until the recorded cache data is added.
649 //TEST_F(MembusterMemoryTest, Windows) { 649 //TEST_F(MembusterMemoryTest, Windows) {
650 // RunTest("membuster", 0); 650 // RunTest("membuster", 0);
651 //} 651 //}
652 652
653 } // namespace 653 } // namespace
OLDNEW
« no previous file with comments | « chrome/test/automated_ui_tests/automated_ui_tests.cc ('k') | chrome/test/reliability/page_load_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698