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