| 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/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 | 444 |
| 445 void InProcessBrowserTest::AddBlankTabAndShow(Browser* browser) { | 445 void InProcessBrowserTest::AddBlankTabAndShow(Browser* browser) { |
| 446 content::WindowedNotificationObserver observer( | 446 content::WindowedNotificationObserver observer( |
| 447 content::NOTIFICATION_LOAD_STOP, | 447 content::NOTIFICATION_LOAD_STOP, |
| 448 content::NotificationService::AllSources()); | 448 content::NotificationService::AllSources()); |
| 449 chrome::AddSelectedTabWithURL(browser, | 449 chrome::AddSelectedTabWithURL(browser, |
| 450 GURL(url::kAboutBlankURL), | 450 GURL(url::kAboutBlankURL), |
| 451 ui::PAGE_TRANSITION_AUTO_TOPLEVEL); | 451 ui::PAGE_TRANSITION_AUTO_TOPLEVEL); |
| 452 observer.Wait(); | 452 observer.Wait(); |
| 453 | 453 |
| 454 browser->window()->Show(); | 454 browser->window()->Show(false /* user_gesture */); |
| 455 } | 455 } |
| 456 | 456 |
| 457 #if !defined(OS_MACOSX) | 457 #if !defined(OS_MACOSX) |
| 458 base::CommandLine InProcessBrowserTest::GetCommandLineForRelaunch() { | 458 base::CommandLine InProcessBrowserTest::GetCommandLineForRelaunch() { |
| 459 base::CommandLine new_command_line( | 459 base::CommandLine new_command_line( |
| 460 base::CommandLine::ForCurrentProcess()->GetProgram()); | 460 base::CommandLine::ForCurrentProcess()->GetProgram()); |
| 461 base::CommandLine::SwitchMap switches = | 461 base::CommandLine::SwitchMap switches = |
| 462 base::CommandLine::ForCurrentProcess()->GetSwitches(); | 462 base::CommandLine::ForCurrentProcess()->GetSwitches(); |
| 463 switches.erase(switches::kUserDataDir); | 463 switches.erase(switches::kUserDataDir); |
| 464 switches.erase(content::kSingleProcessTestsFlag); | 464 switches.erase(content::kSingleProcessTestsFlag); |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 588 // On the Mac, this eventually reaches | 588 // On the Mac, this eventually reaches |
| 589 // -[BrowserWindowController windowWillClose:], which will post a deferred | 589 // -[BrowserWindowController windowWillClose:], which will post a deferred |
| 590 // -autorelease on itself to ultimately destroy the Browser object. The line | 590 // -autorelease on itself to ultimately destroy the Browser object. The line |
| 591 // below is necessary to pump these pending messages to ensure all Browsers | 591 // below is necessary to pump these pending messages to ensure all Browsers |
| 592 // get deleted. | 592 // get deleted. |
| 593 content::RunAllPendingInMessageLoop(); | 593 content::RunAllPendingInMessageLoop(); |
| 594 delete autorelease_pool_; | 594 delete autorelease_pool_; |
| 595 autorelease_pool_ = NULL; | 595 autorelease_pool_ = NULL; |
| 596 #endif | 596 #endif |
| 597 } | 597 } |
| OLD | NEW |