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

Unified Diff: chrome/test/base/chrome_test_launcher.cc

Issue 10855231: Make content_browsertests support restarts across a test. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Allow _CRASH suffix Created 8 years, 4 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
« no previous file with comments | « no previous file | content/public/test/test_launcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/chrome_test_launcher.cc
===================================================================
--- chrome/test/base/chrome_test_launcher.cc (revision 152131)
+++ chrome/test/base/chrome_test_launcher.cc (working copy)
@@ -10,7 +10,6 @@
#include "base/logging.h"
#include "base/memory/linked_ptr.h"
#include "base/run_loop.h"
-#include "base/scoped_temp_dir.h"
#include "base/test/test_file_util.h"
#include "chrome/app/chrome_main_delegate.h"
#include "chrome/common/chrome_switches.h"
@@ -78,7 +77,7 @@
}
virtual bool AdjustChildProcessCommandLine(
- CommandLine* command_line) OVERRIDE {
+ CommandLine* command_line, const FilePath& temp_data_dir) OVERRIDE {
CommandLine new_command_line(command_line->GetProgram());
CommandLine::SwitchMap switches = command_line->GetSwitches();
@@ -90,21 +89,8 @@
new_command_line.AppendSwitchNative((*iter).first, (*iter).second);
}
- // Clean up previous temp dir.
- // We Take() the directory and delete it ourselves so that the next
- // CreateUniqueTempDir will succeed even if deleting the directory fails.
- if (!temp_dir_.path().empty() &&
- !file_util::DieFileDie(temp_dir_.Take(), true)) {
- LOG(ERROR) << "Error deleting previous temp profile directory";
- }
+ new_command_line.AppendSwitchPath(switches::kUserDataDir, temp_data_dir);
- // Create a new user data dir and pass it to the child.
- if (!temp_dir_.CreateUniqueTempDir() || !temp_dir_.IsValid()) {
- LOG(ERROR) << "Error creating temp profile directory";
- return false;
- }
- new_command_line.AppendSwitchPath(switches::kUserDataDir, temp_dir_.path());
-
// file:// access for ChromeOS.
new_command_line.AppendSwitch(switches::kAllowFileAccess);
@@ -133,8 +119,6 @@
}
private:
- ScopedTempDir temp_dir_;
-
#if !defined(USE_AURA) && defined(TOOLKIT_VIEWS)
std::stack<linked_ptr<views::AcceleratorHandler> > handlers_;
#endif
« no previous file with comments | « no previous file | content/public/test/test_launcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698