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

Unified Diff: chrome/browser/instant/instant_browsertest.cc

Issue 11644009: Added support for passing WindowOpenDisposition into BrowserInstantController::OpenURL() from the o… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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/browser/instant/instant_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/instant/instant_browsertest.cc
diff --git a/chrome/browser/instant/instant_browsertest.cc b/chrome/browser/instant/instant_browsertest.cc
index 3813c54e95b2cb52c74faffa03dd560e8dcfd302..70d09dbb32084b20f36c98e75828555bc17d5243 100644
--- a/chrome/browser/instant/instant_browsertest.cc
+++ b/chrome/browser/instant/instant_browsertest.cc
@@ -974,6 +974,22 @@ IN_PROC_BROWSER_TEST_F(InstantTest, SuggestionsAreCaseInsensitive) {
EXPECT_EQ(WideToUTF16(L"\u1e0b\u0323oh"), omnibox()->GetText());
}
+// Test that middle clicking on a suggestion opens the result in a new tab.
+IN_PROC_BROWSER_TEST_F(InstantTest, MiddleClickOnSuggestionOpensInNewTab) {
+ ASSERT_NO_FATAL_FAILURE(SetupInstant());
+ FocusOmniboxAndWaitForInstantSupport();
+
+ GURL url(std::string("http://google.com"));
+ LOG(ERROR) << "BEFORE: TAB COUNT: " << browser()->tab_strip_model()->count();
+ instant()->NavigateToURL(url, content::PAGE_TRANSITION_TYPED, NEW_BACKGROUND_TAB);
+ LOG(ERROR) << "AFTER: TAB COUNT: " << browser()->tab_strip_model()->count();
+
+ // Check that we have two tabs and that the new active tab is indeed what was
+ // once the preview. The preview tab should have just one navigation entry,
+ // for the Instant search that was committed.
+ EXPECT_EQ(2, browser()->tab_strip_model()->count());
dougw 2013/01/24 03:05:25 Any idea why this is failing? I've started debug
sreeram 2013/01/24 03:50:08 Sure :) It's because these tests (InstantTest.*) a
+}
+
// Flakes on Windows: http://crbug.com/170677
#if defined(OS_WIN)
#define MAYBE_CommitInNewTab DISABLED_CommitInNewTab
« no previous file with comments | « no previous file | chrome/browser/instant/instant_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698