| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/test/in_process_browser_test.h" | 5 #include "chrome/test/in_process_browser_test.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 135 |
| 136 // Turn off tip loading for tests; see http://crbug.com/17725 | 136 // Turn off tip loading for tests; see http://crbug.com/17725 |
| 137 command_line->AppendSwitch(switches::kDisableWebResources); | 137 command_line->AppendSwitch(switches::kDisableWebResources); |
| 138 | 138 |
| 139 command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir); | 139 command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir); |
| 140 | 140 |
| 141 // Don't show the first run ui. | 141 // Don't show the first run ui. |
| 142 command_line->AppendSwitch(switches::kNoFirstRun); | 142 command_line->AppendSwitch(switches::kNoFirstRun); |
| 143 | 143 |
| 144 // This is a Browser test. | 144 // This is a Browser test. |
| 145 command_line->AppendSwitchWithValue(switches::kTestType, kBrowserTestType); | 145 command_line->AppendSwitchASCII(switches::kTestType, kBrowserTestType); |
| 146 | 146 |
| 147 // Single-process mode is not set in BrowserMain so it needs to be processed | 147 // Single-process mode is not set in BrowserMain so it needs to be processed |
| 148 // explicitly. | 148 // explicitly. |
| 149 original_single_process_ = RenderProcessHost::run_renderer_in_process(); | 149 original_single_process_ = RenderProcessHost::run_renderer_in_process(); |
| 150 if (command_line->HasSwitch(switches::kSingleProcess)) | 150 if (command_line->HasSwitch(switches::kSingleProcess)) |
| 151 RenderProcessHost::set_run_renderer_in_process(true); | 151 RenderProcessHost::set_run_renderer_in_process(true); |
| 152 | 152 |
| 153 #if defined(OS_WIN) | 153 #if defined(OS_WIN) |
| 154 // The Windows sandbox requires that the browser and child processes are the | 154 // The Windows sandbox requires that the browser and child processes are the |
| 155 // same binary. So we launch browser_process.exe which loads chrome.dll | 155 // same binary. So we launch browser_process.exe which loads chrome.dll |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 | 336 |
| 337 GTEST_NONFATAL_FAILURE_(error_message.c_str()); | 337 GTEST_NONFATAL_FAILURE_(error_message.c_str()); |
| 338 | 338 |
| 339 MessageLoopForUI::current()->Quit(); | 339 MessageLoopForUI::current()->Quit(); |
| 340 } | 340 } |
| 341 | 341 |
| 342 void InProcessBrowserTest::SetInitialTimeoutInMS(int timeout_value) { | 342 void InProcessBrowserTest::SetInitialTimeoutInMS(int timeout_value) { |
| 343 DCHECK_GT(timeout_value, 0); | 343 DCHECK_GT(timeout_value, 0); |
| 344 initial_timeout_ = timeout_value; | 344 initial_timeout_ = timeout_value; |
| 345 } | 345 } |
| OLD | NEW |