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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/instant/instant_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/browser/content_settings/host_content_settings_map.h" 5 #include "chrome/browser/content_settings/host_content_settings_map.h"
6 #include "chrome/browser/history/history_service_factory.h" 6 #include "chrome/browser/history/history_service_factory.h"
7 #include "chrome/browser/instant/instant_loader.h" 7 #include "chrome/browser/instant/instant_loader.h"
8 #include "chrome/browser/instant/instant_model_observer.h" 8 #include "chrome/browser/instant/instant_model_observer.h"
9 #include "chrome/browser/prefs/pref_service.h" 9 #include "chrome/browser/prefs/pref_service.h"
10 #include "chrome/browser/search_engines/template_url_service.h" 10 #include "chrome/browser/search_engines/template_url_service.h"
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 // how that is encoded. 967 // how that is encoded.
968 // U+1E0D = LATIN SMALL LETTER D WITH DOT BELOW 968 // U+1E0D = LATIN SMALL LETTER D WITH DOT BELOW
969 // U+1E0B = LATIN SMALL LETTER D WITH DOT ABOVE 969 // U+1E0B = LATIN SMALL LETTER D WITH DOT ABOVE
970 EXPECT_TRUE(ExecuteScript("suggestion = [ { value: '\\u1e0d\\u0307oh' } ]")); 970 EXPECT_TRUE(ExecuteScript("suggestion = [ { value: '\\u1e0d\\u0307oh' } ]"));
971 971
972 omnibox()->RevertAll(); 972 omnibox()->RevertAll();
973 SetOmniboxTextAndWaitForInstantToShow(WideToUTF8(L"\u1e0b\u0323")); 973 SetOmniboxTextAndWaitForInstantToShow(WideToUTF8(L"\u1e0b\u0323"));
974 EXPECT_EQ(WideToUTF16(L"\u1e0b\u0323oh"), omnibox()->GetText()); 974 EXPECT_EQ(WideToUTF16(L"\u1e0b\u0323oh"), omnibox()->GetText());
975 } 975 }
976 976
977 // Test that middle clicking on a suggestion opens the result in a new tab.
978 IN_PROC_BROWSER_TEST_F(InstantTest, MiddleClickOnSuggestionOpensInNewTab) {
979 ASSERT_NO_FATAL_FAILURE(SetupInstant());
980 FocusOmniboxAndWaitForInstantSupport();
981
982 GURL url(std::string("http://google.com"));
983 LOG(ERROR) << "BEFORE: TAB COUNT: " << browser()->tab_strip_model()->count();
984 instant()->NavigateToURL(url, content::PAGE_TRANSITION_TYPED, NEW_BACKGROUND_T AB);
985 LOG(ERROR) << "AFTER: TAB COUNT: " << browser()->tab_strip_model()->count();
986
987 // Check that we have two tabs and that the new active tab is indeed what was
988 // once the preview. The preview tab should have just one navigation entry,
989 // for the Instant search that was committed.
990 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
991 }
992
977 // Flakes on Windows: http://crbug.com/170677 993 // Flakes on Windows: http://crbug.com/170677
978 #if defined(OS_WIN) 994 #if defined(OS_WIN)
979 #define MAYBE_CommitInNewTab DISABLED_CommitInNewTab 995 #define MAYBE_CommitInNewTab DISABLED_CommitInNewTab
980 #else 996 #else
981 #define MAYBE_CommitInNewTab CommitInNewTab 997 #define MAYBE_CommitInNewTab CommitInNewTab
982 #endif 998 #endif
983 // Test that the preview can be committed onto a new tab. 999 // Test that the preview can be committed onto a new tab.
984 IN_PROC_BROWSER_TEST_F(InstantTest, MAYBE_CommitInNewTab) { 1000 IN_PROC_BROWSER_TEST_F(InstantTest, MAYBE_CommitInNewTab) {
985 ASSERT_NO_FATAL_FAILURE(SetupInstant()); 1001 ASSERT_NO_FATAL_FAILURE(SetupInstant());
986 FocusOmniboxAndWaitForInstantSupport(); 1002 FocusOmniboxAndWaitForInstantSupport();
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 SetOmniboxTextAndWaitForInstantToShow("q"); 1104 SetOmniboxTextAndWaitForInstantToShow("q");
1089 EXPECT_EQ(ASCIIToUTF16("query suggestion"), omnibox()->GetText()); 1105 EXPECT_EQ(ASCIIToUTF16("query suggestion"), omnibox()->GetText());
1090 1106
1091 // Kill the instant renderer and wait for instant support again. 1107 // Kill the instant renderer and wait for instant support again.
1092 KillInstantRenderView(); 1108 KillInstantRenderView();
1093 FocusOmniboxAndWaitForInstantSupport(); 1109 FocusOmniboxAndWaitForInstantSupport();
1094 1110
1095 SetOmniboxTextAndWaitForInstantToShow("qu"); 1111 SetOmniboxTextAndWaitForInstantToShow("qu");
1096 EXPECT_EQ(ASCIIToUTF16("query suggestion"), omnibox()->GetText()); 1112 EXPECT_EQ(ASCIIToUTF16("query suggestion"), omnibox()->GetText());
1097 } 1113 }
OLDNEW
« 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