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

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

Issue 360373006: Enable prefetch-search-results on Desktop Chrome by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added DCHECK Created 6 years, 5 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 | « chrome/browser/ui/search/search_ipc_router.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/search/search_ipc_router_unittest.cc
diff --git a/chrome/browser/ui/search/search_ipc_router_unittest.cc b/chrome/browser/ui/search/search_ipc_router_unittest.cc
index bccacd260a2430b0e9f77dc5571f7b20a3642367..5332191538f8a5daa140ac186e1ba8db5cf89684 100644
--- a/chrome/browser/ui/search/search_ipc_router_unittest.cc
+++ b/chrome/browser/ui/search/search_ipc_router_unittest.cc
@@ -680,7 +680,8 @@ TEST_F(SearchIPCRouterTest,
SendSetDisplayInstantResultsMsg_DisableInstantOnResultsPage) {
// |prefetch_results_srp" flag is disabled via field trials.
ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial(
- "EmbeddedSearch", "Group1 espv:42 prefetch_results_srp:0"));
+ "EmbeddedSearch",
+ "Group1 espv:42 query_extraction:1 prefetch_results_srp:0"));
NavigateAndCommitActiveTab(GURL("https://foo.com/url?espv&bar=abc"));
// Make sure ChromeViewMsg_SearchBoxSetDisplayInstantResults message param is
@@ -689,41 +690,13 @@ TEST_F(SearchIPCRouterTest,
}
TEST_F(SearchIPCRouterTest,
- SendSetDisplayInstantResultsMsg_DisableInstantOutsideResultsPage) {
- ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial(
- "EmbeddedSearch", "Group1 espv:42 prefetch_results_srp:1"));
+ SendSetDisplayInstantResultsMsg_EnableInstantOutsideSearchResultsPage) {
NavigateAndCommitActiveTab(GURL(chrome::kChromeSearchLocalNtpUrl));
-
// Make sure ChromeViewMsg_SearchBoxSetDisplayInstantResults param is set to
- // false if the underlying page is not a search results page.
- VerifyDisplayInstantResultsMsg(false);
-}
-
-TEST_F(SearchIPCRouterTest,
- SendSetDisplayInstantResultsMsg_InstantSearchEnabled) {
- ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial(
- "EmbeddedSearch",
- "Group1 espv:42 prefetch_results:1 use_cacheable_ntp:1"));
- NavigateAndCommitActiveTab(GURL(chrome::kChromeSearchLocalNtpUrl));
-
- // If the "prefetch_results" flag is enabled via field trials, then
- // ChromeViewMsg_SearchBoxSetDisplayInstantResults message param is set to
- // true irrespective of the underlying page.
+ // true if the underlying page is not a search results page.
VerifyDisplayInstantResultsMsg(true);
}
-TEST_F(SearchIPCRouterTest,
- SendSetDisplayInstantResultsMsg_InstantSearchDisabled) {
- ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial(
- "EmbeddedSearch",
- "Group1 espv:42 use_cacheable_ntp:1 prefetch_results:0"));
- NavigateAndCommitActiveTab(GURL(chrome::kChromeSearchLocalNtpUrl));
-
- // Make sure ChromeViewMsg_SearchBoxSetDisplayInstantResults param is set to
- // false if the "prefetch_results" flag is disabled via field trials.
- VerifyDisplayInstantResultsMsg(false);
-}
-
TEST_F(SearchIPCRouterTest, DoNotSendSetDisplayInstantResultsMsg) {
NavigateAndCommitActiveTab(GURL("chrome-search://foo/bar"));
SetupMockDelegateAndPolicy();
« no previous file with comments | « chrome/browser/ui/search/search_ipc_router.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698