Chromium Code Reviews| Index: chrome/app/chrome_main_uitest.cc |
| =================================================================== |
| --- chrome/app/chrome_main_uitest.cc (revision 11106) |
| +++ chrome/app/chrome_main_uitest.cc (working copy) |
| @@ -2,9 +2,13 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#include "chrome/common/chrome_constants.h" |
| #include "chrome/test/ui/ui_test.h" |
| +#include "base/command_line.h" |
| +#include "base/file_path.h" |
| +#include "base/file_util.h" |
| +#include "net/base/net_util.h" |
| + |
| typedef UITest ChromeMainTest; |
| // Launch the app, then close the app. |
| @@ -44,3 +48,20 @@ |
| ASSERT_EQ(2, window_count); |
| } |
| +TEST_F(ChromeMainTest, ReuseBrowserInstanceWhenOpeningFile) { |
| + include_testing_id_ = false; |
| + use_existing_browser_ = true; |
| + |
| + std::wstring test_file = test_data_directory_; |
| + file_util::AppendToPath(&test_file, L"empty.html"); |
| + |
| + CommandLine command_line(L""); |
| + command_line.AppendLooseValue(test_file); |
| + |
| + LaunchBrowser(command_line, false); |
| + |
| + FilePath test_file_path(FilePath::FromWStringHack(test_file)); |
| + |
| + ASSERT_TRUE(automation()->WaitForURLDisplayed( |
| + net::FilePathToFileURL(test_file_path), action_timeout_ms())); |
|
Nicolas Sylvain
2009/03/06 20:50:46
did we understand why it's creating a window inste
|
| +} |