| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/base/in_process_browser_test.h" | 5 #include "chrome/test/base/in_process_browser_test.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 } | 284 } |
| 285 | 285 |
| 286 #if !defined(OS_MACOSX) | 286 #if !defined(OS_MACOSX) |
| 287 CommandLine InProcessBrowserTest::GetCommandLineForRelaunch() { | 287 CommandLine InProcessBrowserTest::GetCommandLineForRelaunch() { |
| 288 CommandLine new_command_line(CommandLine::ForCurrentProcess()->GetProgram()); | 288 CommandLine new_command_line(CommandLine::ForCurrentProcess()->GetProgram()); |
| 289 CommandLine::SwitchMap switches = | 289 CommandLine::SwitchMap switches = |
| 290 CommandLine::ForCurrentProcess()->GetSwitches(); | 290 CommandLine::ForCurrentProcess()->GetSwitches(); |
| 291 switches.erase(switches::kUserDataDir); | 291 switches.erase(switches::kUserDataDir); |
| 292 switches.erase(test_launcher::kSingleProcessTestsFlag); | 292 switches.erase(test_launcher::kSingleProcessTestsFlag); |
| 293 switches.erase(test_launcher::kSingleProcessTestsAndChromeFlag); | 293 switches.erase(test_launcher::kSingleProcessTestsAndChromeFlag); |
| 294 new_command_line.AppendSwitch(ChromeTestSuite::kLaunchAsBrowser); | 294 new_command_line.AppendSwitch(test_launcher::kLaunchAsBrowser); |
| 295 | 295 |
| 296 #if defined(USE_AURA) | 296 #if defined(USE_AURA) |
| 297 // Copy what UITestBase::SetLaunchSwitches() does, and also what | 297 // Copy what UITestBase::SetLaunchSwitches() does, and also what |
| 298 // ChromeTestSuite does if the process had went into the test path. Otherwise | 298 // ChromeTestSuite does if the process had went into the test path. Otherwise |
| 299 // tests will fail on bots. | 299 // tests will fail on bots. |
| 300 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 300 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
| 301 switches::kDisableTestCompositor)) { | 301 switches::kDisableTestCompositor)) { |
| 302 new_command_line.AppendSwitch(switches::kTestCompositor); | 302 new_command_line.AppendSwitch(switches::kTestCompositor); |
| 303 } | 303 } |
| 304 #endif | 304 #endif |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 // On the Mac, this eventually reaches | 379 // On the Mac, this eventually reaches |
| 380 // -[BrowserWindowController windowWillClose:], which will post a deferred | 380 // -[BrowserWindowController windowWillClose:], which will post a deferred |
| 381 // -autorelease on itself to ultimately destroy the Browser object. The line | 381 // -autorelease on itself to ultimately destroy the Browser object. The line |
| 382 // below is necessary to pump these pending messages to ensure all Browsers | 382 // below is necessary to pump these pending messages to ensure all Browsers |
| 383 // get deleted. | 383 // get deleted. |
| 384 content::RunAllPendingInMessageLoop(); | 384 content::RunAllPendingInMessageLoop(); |
| 385 delete autorelease_pool_; | 385 delete autorelease_pool_; |
| 386 autorelease_pool_ = NULL; | 386 autorelease_pool_ = NULL; |
| 387 #endif | 387 #endif |
| 388 } | 388 } |
| OLD | NEW |