| Index: chrome/test/in_process_browser_test.cc
|
| diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc
|
| index 45cb676e6b67ffae68714d2b3795c41f514f01c3..5c6291bd095cdf19b4ee1ce2ab0e5130f121f3ea 100644
|
| --- a/chrome/test/in_process_browser_test.cc
|
| +++ b/chrome/test/in_process_browser_test.cc
|
| @@ -99,14 +99,6 @@ InProcessBrowserTest::~InProcessBrowserTest() {
|
| }
|
|
|
| void InProcessBrowserTest::SetUp() {
|
| - // Remember the command line. Normally this doesn't matter, because the test
|
| - // harness creates a new process for each test, but when the test harness is
|
| - // running in single process mode, we can't let one test's command-line
|
| - // changes (e.g. enabling DOM automation) affect other tests.
|
| - // TODO(phajdan.jr): This save/restore logic is unnecessary. Remove it.
|
| - CommandLine* command_line = CommandLine::ForCurrentProcessMutable();
|
| - original_command_line_.reset(new CommandLine(*command_line));
|
| -
|
| // Create a temporary user data directory if required.
|
| ASSERT_TRUE(CreateUserDataDirectory())
|
| << "Could not create user data directory.";
|
| @@ -126,6 +118,7 @@ void InProcessBrowserTest::SetUp() {
|
| // bundle we'll crash.
|
| browser_shutdown::delete_resources_on_shutdown = false;
|
|
|
| + CommandLine* command_line = CommandLine::ForCurrentProcess();
|
| // Allow subclasses the opportunity to make changes to the command line before
|
| // running any tests.
|
| SetUpCommandLine(command_line);
|
| @@ -216,7 +209,7 @@ void InProcessBrowserTest::PrepareTestCommandLine(
|
| }
|
|
|
| bool InProcessBrowserTest::CreateUserDataDirectory() {
|
| - CommandLine* command_line = CommandLine::ForCurrentProcessMutable();
|
| + CommandLine* command_line = CommandLine::ForCurrentProcess();
|
| FilePath user_data_dir =
|
| command_line->GetSwitchValuePath(switches::kUserDataDir);
|
| if (user_data_dir.empty()) {
|
| @@ -243,7 +236,6 @@ void InProcessBrowserTest::TearDown() {
|
| BrowserView::SetShowState(-1);
|
| #endif
|
|
|
| - *CommandLine::ForCurrentProcessMutable() = *original_command_line_;
|
| RenderProcessHost::set_run_renderer_in_process(original_single_process_);
|
| }
|
|
|
|
|