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

Unified Diff: chrome/browser/search/search_unittest.cc

Issue 2651763002: Cleanup in components/search and chrome/browser/search (Closed)
Patch Set: for each Created 3 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 | « chrome/browser/search/search.cc ('k') | chrome/browser/ui/search/instant_search_prerenderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search/search_unittest.cc
diff --git a/chrome/browser/search/search_unittest.cc b/chrome/browser/search/search_unittest.cc
index 1761130c99d8e1926462d9ce02a00d2dac8b94d9..dd04bc05bbd4366e54636ff1b9270eb9111ea677 100644
--- a/chrome/browser/search/search_unittest.cc
+++ b/chrome/browser/search/search_unittest.cc
@@ -557,7 +557,6 @@ TEST_F(SearchTest, GetSearchURLs) {
}
TEST_F(SearchTest, GetSearchResultPrefetchBaseURL) {
- EXPECT_TRUE(ShouldPrefetchSearchResults());
EXPECT_EQ(GURL("https://foo.com/instant?ion=1&foo=foo#foo=foo&strk"),
GetSearchResultPrefetchBaseURL(profile()));
}
@@ -586,31 +585,6 @@ TEST_F(SearchTest, ExtractSearchTermsFromURL) {
}
}
-struct QueryExtractionAllowedTestCase {
- const char* url;
- bool expected_result;
- const char* comment;
-};
-
-TEST_F(SearchTest, IsQueryExtractionAllowedForURL) {
- const QueryExtractionAllowedTestCase kTestCases[] = {
- {"http://foo.com/instant?strk", false, "HTTP URL"},
- {"https://foo.com/instant?strk", true, "Valid URL"},
- {"https://foo.com/instant?", false,
- "No search terms replacement key"},
- {"https://foo.com/alt#quux=foo", false,
- "No search terms replacement key"},
- {"https://foo.com/alt#quux=foo&strk", true, "Valid search url"}
- };
-
- for (size_t i = 0; i < arraysize(kTestCases); ++i) {
- const QueryExtractionAllowedTestCase& test = kTestCases[i];
- EXPECT_EQ(test.expected_result,
- IsQueryExtractionAllowedForURL(profile(), GURL(test.url)))
- << test.url << " " << test.comment;
- }
-}
-
// Regression test for https://crbug.com/605720: Set up a search provider backed
// by localhost on a specific port, like browsertests do. The chrome-search://
// URLs generated in this mode should not have ports.
« no previous file with comments | « chrome/browser/search/search.cc ('k') | chrome/browser/ui/search/instant_search_prerenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698