| Index: chrome/test/ui/ui_test.cc
|
| diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc
|
| index a2d658e0e611a2c5213e09422d68c5355cd0678c..851a6c434cc5f4216f1364ca441b3c6013a1629a 100644
|
| --- a/chrome/test/ui/ui_test.cc
|
| +++ b/chrome/test/ui/ui_test.cc
|
| @@ -93,7 +93,6 @@ UITestBase::UITestBase()
|
| shutdown_type_(ProxyLauncher::WINDOW_CLOSE) {
|
| PathService::Get(chrome::DIR_APP, &browser_directory_);
|
| PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory_);
|
| - launcher_.reset(CreateProxyLauncher());
|
| }
|
|
|
| UITestBase::UITestBase(MessageLoop::Type msg_loop_type)
|
| @@ -110,12 +109,15 @@ UITestBase::UITestBase(MessageLoop::Type msg_loop_type)
|
| shutdown_type_(ProxyLauncher::WINDOW_CLOSE) {
|
| PathService::Get(chrome::DIR_APP, &browser_directory_);
|
| PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory_);
|
| - launcher_.reset(CreateProxyLauncher());
|
| }
|
|
|
| UITestBase::~UITestBase() {}
|
|
|
| void UITestBase::SetUp() {
|
| + // Some tests (e.g. SessionRestoreUITest) call SetUp() multiple times,
|
| + // but the ProxyLauncher should be initialized only once per instance.
|
| + if (!launcher_.get())
|
| + launcher_.reset(CreateProxyLauncher());
|
| launcher_->AssertAppNotRunning(L"Please close any other instances "
|
| L"of the app before testing.");
|
|
|
|
|