Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3605)

Unified Diff: chrome/app/chrome_main_uitest.cc

Issue 39257: Add regression test for bug 7900 and necessary infrastructure.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/automation/automation_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
+}
« no previous file with comments | « no previous file | chrome/test/automation/automation_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698