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

Unified Diff: chrome/browser/ui/search/instant_search_prerenderer_unittest.cc

Issue 1260033003: Partially componentize //chrome/browser/search/search.{h,cc} (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation on iOS Created 5 years, 4 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
Index: chrome/browser/ui/search/instant_search_prerenderer_unittest.cc
diff --git a/chrome/browser/ui/search/instant_search_prerenderer_unittest.cc b/chrome/browser/ui/search/instant_search_prerenderer_unittest.cc
index 11db5edbd25e659b28b01e84cc4cc18eb5f81748..0f9aafc99aa4241d1b348faf43275470f6d833c8 100644
--- a/chrome/browser/ui/search/instant_search_prerenderer_unittest.cc
+++ b/chrome/browser/ui/search/instant_search_prerenderer_unittest.cc
@@ -224,17 +224,17 @@ TEST_F(InstantSearchPrerendererTest, GetSearchTermsFromPrerenderedPage) {
GURL url(GetPrerenderURL());
EXPECT_EQ(GURL("https://www.google.com/instant?ion=1&foo=foo#foo=foo&strk"),
url);
- EXPECT_EQ(base::UTF16ToASCII(prerenderer->get_last_query()),
- base::UTF16ToASCII(
- chrome::ExtractSearchTermsFromURL(profile(), url)));
+ EXPECT_EQ(
+ base::UTF16ToASCII(prerenderer->get_last_query()),
+ base::UTF16ToASCII(search::ExtractSearchTermsFromURL(profile(), url)));
// Assume the prerendered page prefetched search results for the query
// "flowers".
SetLastQuery(ASCIIToUTF16("flowers"));
EXPECT_EQ("flowers", base::UTF16ToASCII(prerenderer->get_last_query()));
- EXPECT_EQ(base::UTF16ToASCII(prerenderer->get_last_query()),
- base::UTF16ToASCII(
- chrome::ExtractSearchTermsFromURL(profile(), url)));
+ EXPECT_EQ(
+ base::UTF16ToASCII(prerenderer->get_last_query()),
+ base::UTF16ToASCII(search::ExtractSearchTermsFromURL(profile(), url)));
}
TEST_F(InstantSearchPrerendererTest, PrefetchSearchResults) {
@@ -347,9 +347,10 @@ TEST_F(InstantSearchPrerendererTest, PrerenderingAllowed) {
// used only when the underlying page doesn't support Instant.
NavigateAndCommitActiveTab(GURL("https://www.google.com/alt#quux=foo&strk"));
active_tab = GetActiveWebContents();
- EXPECT_FALSE(chrome::ExtractSearchTermsFromURL(profile(),
- active_tab->GetURL()).empty());
- EXPECT_FALSE(chrome::ShouldPrefetchSearchResultsOnSRP());
+ EXPECT_FALSE(
+ search::ExtractSearchTermsFromURL(profile(), active_tab->GetURL())
+ .empty());
+ EXPECT_FALSE(search::ShouldPrefetchSearchResultsOnSRP());
EXPECT_FALSE(prerenderer->IsAllowed(search_type_match, active_tab));
}
« no previous file with comments | « chrome/browser/ui/search/instant_search_prerenderer.cc ('k') | chrome/browser/ui/search/local_ntp_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698