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

Unified Diff: chrome/browser/autocomplete/autocomplete_provider_unittest.cc

Issue 12218104: Fix memory leak in AutocompleteProviderTest::GetDestinationURL unit test. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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/autocomplete/autocomplete_controller.cc ('k') | tools/heapcheck/suppressions.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/autocomplete_provider_unittest.cc
===================================================================
--- chrome/browser/autocomplete/autocomplete_provider_unittest.cc (revision 181776)
+++ chrome/browser/autocomplete/autocomplete_provider_unittest.cc (working copy)
@@ -256,7 +256,7 @@
// Reset the controller to contain our new providers.
controller_.reset(
new AutocompleteController(&profile_, NULL,
- AutocompleteProvider::TYPE_SEARCH));
+ 0));
controller_->providers_.swap(providers);
Bart N. 2013/02/12 00:30:34 I know it's not your fault, but the existing code
H Fung 2013/02/12 01:01:06 Done.
provider1->set_listener(controller_.get());
provider2->set_listener(controller_.get());
@@ -559,7 +559,7 @@
}
TEST_F(AutocompleteProviderTest, GetDestinationURL) {
- ResetControllerWithTestProviders(false, NULL, NULL);
+ ResetControllerWithKeywordAndSearchProviders();
// For the destination URL to have aqs parameters for query formulation time
// and the field trial triggered bit, many conditions need to be satisfied.
@@ -597,6 +597,8 @@
// Test field trial triggered bit set.
controller_->search_provider_->field_trial_triggered_in_session_ = true;
+ EXPECT_TRUE(controller_->search_provider_->
+ field_trial_triggered_in_session());
url = controller_->GetDestinationURL(match,
base::TimeDelta::FromMilliseconds(2456));
EXPECT_EQ("//aqs=chrome.0.57j58j5l2j0l3j59.2456j1&", url.path());
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_controller.cc ('k') | tools/heapcheck/suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698