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

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

Issue 10037023: Enable UserDataDir selection in InProcessBrowserTest (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Updated to latest master branch Created 8 years, 8 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 | « chrome/browser/extensions/extension_startup_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/in_process_browser_test.cc
diff --git a/chrome/test/base/in_process_browser_test.cc b/chrome/test/base/in_process_browser_test.cc
index ebce6ca3cca5a73d333a4e34523e15347c3d681d..f29448bd496782a7da95287f014d6a970133b85b 100644
--- a/chrome/test/base/in_process_browser_test.cc
+++ b/chrome/test/base/in_process_browser_test.cc
@@ -87,27 +87,27 @@ InProcessBrowserTest::~InProcessBrowserTest() {
}
void InProcessBrowserTest::SetUp() {
- // Create a temporary user data directory if required.
- ASSERT_TRUE(CreateUserDataDirectory())
- << "Could not create user data directory.";
-
// Undo TestingBrowserProcess creation in ChromeTestSuite.
// TODO(phajdan.jr): Extract a smaller test suite so we don't need this.
DCHECK(g_browser_process);
delete g_browser_process;
g_browser_process = NULL;
- // Allow subclasses the opportunity to make changes to the default user data
- // dir before running any tests.
- ASSERT_TRUE(SetUpUserDataDirectory())
- << "Could not set up user data directory.";
-
CommandLine* command_line = CommandLine::ForCurrentProcess();
// Allow subclasses to change the command line before running any tests.
SetUpCommandLine(command_line);
// Add command line arguments that are used by all InProcessBrowserTests.
PrepareTestCommandLine(command_line);
+ // Create a temporary user data directory if required.
+ ASSERT_TRUE(CreateUserDataDirectory())
+ << "Could not create user data directory.";
+
+ // Allow subclasses the opportunity to make changes to the default user data
+ // dir before running any tests.
+ ASSERT_TRUE(SetUpUserDataDirectory())
+ << "Could not set up user data directory.";
+
// Single-process mode is not set in BrowserMain, so process it explicitly,
// and set up renderer.
if (command_line->HasSwitch(switches::kSingleProcess)) {
« no previous file with comments | « chrome/browser/extensions/extension_startup_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698