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

Side by Side Diff: chrome/browser/autocomplete/search_provider_unittest.cc

Issue 11262015: Remove unused / unnecessary stuff from Instant. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove SuggestedTextView entirely Created 8 years, 1 month 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/autocomplete/search_provider.h" 5 #include "chrome/browser/autocomplete/search_provider.h"
6 6
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 // URLFetchers runs. 204 // URLFetchers runs.
205 message_loop_.RunAllPending(); 205 message_loop_.RunAllPending();
206 } 206 }
207 207
208 void SearchProviderTest::QueryForInputAndSetWYTMatch( 208 void SearchProviderTest::QueryForInputAndSetWYTMatch(
209 const string16& text, 209 const string16& text,
210 AutocompleteMatch* wyt_match) { 210 AutocompleteMatch* wyt_match) {
211 QueryForInput(text, string16(), false); 211 QueryForInput(text, string16(), false);
212 profile_.BlockUntilHistoryProcessesPendingRequests(); 212 profile_.BlockUntilHistoryProcessesPendingRequests();
213 ASSERT_NO_FATAL_FAILURE(FinishDefaultSuggestQuery()); 213 ASSERT_NO_FATAL_FAILURE(FinishDefaultSuggestQuery());
214 EXPECT_NE(InstantController::IsSuggestEnabled(&profile_), provider_->done()); 214 EXPECT_NE(InstantController::IsInstantEnabled(&profile_), provider_->done());
215 if (!wyt_match) 215 if (!wyt_match)
216 return; 216 return;
217 ASSERT_GE(provider_->matches().size(), 1u); 217 ASSERT_GE(provider_->matches().size(), 1u);
218 EXPECT_TRUE(FindMatchWithDestination(GURL( 218 EXPECT_TRUE(FindMatchWithDestination(GURL(
219 default_t_url_->url_ref().ReplaceSearchTerms( 219 default_t_url_->url_ref().ReplaceSearchTerms(
220 TemplateURLRef::SearchTermsArgs(text))), 220 TemplateURLRef::SearchTermsArgs(text))),
221 wyt_match)); 221 wyt_match));
222 } 222 }
223 223
224 void SearchProviderTest::TearDown() { 224 void SearchProviderTest::TearDown() {
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after
1253 EXPECT_EQ(AutocompleteMatch::ACMatchClassification::URL, 1253 EXPECT_EQ(AutocompleteMatch::ACMatchClassification::URL,
1254 match.contents_class[0].style); 1254 match.contents_class[0].style);
1255 EXPECT_EQ(4U, match.contents_class[1].offset); 1255 EXPECT_EQ(4U, match.contents_class[1].offset);
1256 EXPECT_EQ(AutocompleteMatch::ACMatchClassification::URL | 1256 EXPECT_EQ(AutocompleteMatch::ACMatchClassification::URL |
1257 AutocompleteMatch::ACMatchClassification::MATCH, 1257 AutocompleteMatch::ACMatchClassification::MATCH,
1258 match.contents_class[1].style); 1258 match.contents_class[1].style);
1259 EXPECT_EQ(5U, match.contents_class[2].offset); 1259 EXPECT_EQ(5U, match.contents_class[2].offset);
1260 EXPECT_EQ(AutocompleteMatch::ACMatchClassification::URL, 1260 EXPECT_EQ(AutocompleteMatch::ACMatchClassification::URL,
1261 match.contents_class[2].style); 1261 match.contents_class[2].style);
1262 } 1262 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/search_provider.cc ('k') | chrome/browser/instant/instant_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698