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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 | 274 |
275 browser->window()->Show(); | 275 browser->window()->Show(); |
276 } | 276 } |
277 | 277 |
278 #if !defined(OS_MACOSX) | 278 #if !defined(OS_MACOSX) |
279 CommandLine InProcessBrowserTest::GetCommandLineForRelaunch() { | 279 CommandLine InProcessBrowserTest::GetCommandLineForRelaunch() { |
280 CommandLine new_command_line(CommandLine::ForCurrentProcess()->GetProgram()); | 280 CommandLine new_command_line(CommandLine::ForCurrentProcess()->GetProgram()); |
281 CommandLine::SwitchMap switches = | 281 CommandLine::SwitchMap switches = |
282 CommandLine::ForCurrentProcess()->GetSwitches(); | 282 CommandLine::ForCurrentProcess()->GetSwitches(); |
283 switches.erase(switches::kUserDataDir); | 283 switches.erase(switches::kUserDataDir); |
284 switches.erase(test_launcher::kSingleProcessTestsFlag); | 284 switches.erase(content::kSingleProcessTestsFlag); |
285 switches.erase(test_launcher::kSingleProcessTestsAndChromeFlag); | 285 switches.erase(content::kSingleProcessTestsAndChromeFlag); |
286 new_command_line.AppendSwitch(test_launcher::kLaunchAsBrowser); | 286 new_command_line.AppendSwitch(content::kLaunchAsBrowser); |
287 | 287 |
288 #if defined(USE_AURA) | 288 #if defined(USE_AURA) |
289 // Copy what UITestBase::SetLaunchSwitches() does, and also what | 289 // Copy what UITestBase::SetLaunchSwitches() does, and also what |
290 // ChromeTestSuite does if the process had went into the test path. Otherwise | 290 // ChromeTestSuite does if the process had went into the test path. Otherwise |
291 // tests will fail on bots. | 291 // tests will fail on bots. |
292 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 292 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
293 switches::kDisableTestCompositor)) { | 293 switches::kDisableTestCompositor)) { |
294 new_command_line.AppendSwitch(switches::kTestCompositor); | 294 new_command_line.AppendSwitch(switches::kTestCompositor); |
295 } | 295 } |
296 #endif | 296 #endif |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 // On the Mac, this eventually reaches | 371 // On the Mac, this eventually reaches |
372 // -[BrowserWindowController windowWillClose:], which will post a deferred | 372 // -[BrowserWindowController windowWillClose:], which will post a deferred |
373 // -autorelease on itself to ultimately destroy the Browser object. The line | 373 // -autorelease on itself to ultimately destroy the Browser object. The line |
374 // below is necessary to pump these pending messages to ensure all Browsers | 374 // below is necessary to pump these pending messages to ensure all Browsers |
375 // get deleted. | 375 // get deleted. |
376 content::RunAllPendingInMessageLoop(); | 376 content::RunAllPendingInMessageLoop(); |
377 delete autorelease_pool_; | 377 delete autorelease_pool_; |
378 autorelease_pool_ = NULL; | 378 autorelease_pool_ = NULL; |
379 #endif | 379 #endif |
380 } | 380 } |
OLD | NEW |