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

Unified Diff: content/public/test/test_launcher.cc

Issue 10855231: Make content_browsertests support restarts across a test. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: 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
Index: content/public/test/test_launcher.cc
===================================================================
--- content/public/test/test_launcher.cc (revision 152131)
+++ content/public/test/test_launcher.cc (working copy)
@@ -440,9 +440,18 @@
// failure status back to the parent.
new_cmd_line.AppendSwitch(base::TestSuite::kStrictFailureHandling);
- if (!launcher_delegate->AdjustChildProcessCommandLine(&new_cmd_line))
+ ScopedTempDir temp_dir;
+ // Create a new data dir and pass it to the child.
+ if (!temp_dir.CreateUniqueTempDir() || !temp_dir.IsValid()) {
+ LOG(ERROR) << "Error creating temp data directory";
return -1;
+ }
+ if (!launcher_delegate->AdjustChildProcessCommandLine(&new_cmd_line,
+ temp_dir.path())) {
+ return -1;
+ }
+
return RunTestInternal(
test_case, test_name, &new_cmd_line, default_timeout, was_timeout);
}

Powered by Google App Engine
This is Rietveld 408576698