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

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

Issue 509563002: Remove implicit conversions from scoped_refptr to T* in chrome/browser/autocomplete/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 3049 matching lines...) Expand 10 before | Expand all | Expand 10 after
3060 service->OnEncryptedTypesChanged(encrypted_types, false); 3060 service->OnEncryptedTypesChanged(encrypted_types, false);
3061 3061
3062 // Check that there were no side effects from previous tests. 3062 // Check that there were no side effects from previous tests.
3063 EXPECT_TRUE(SearchProvider::CanSendURL( 3063 EXPECT_TRUE(SearchProvider::CanSendURL(
3064 GURL("http://www.google.com/search"), 3064 GURL("http://www.google.com/search"),
3065 GURL("https://www.google.com/complete/search"), &google_template_url, 3065 GURL("https://www.google.com/complete/search"), &google_template_url,
3066 metrics::OmniboxEventProto::OTHER, SearchTermsData(), &delegate)); 3066 metrics::OmniboxEventProto::OTHER, SearchTermsData(), &delegate));
3067 } 3067 }
3068 3068
3069 TEST_F(SearchProviderTest, TestDeleteMatch) { 3069 TEST_F(SearchProviderTest, TestDeleteMatch) {
3070 AutocompleteMatch match(provider_, 0, true, 3070 AutocompleteMatch match(
3071 AutocompleteMatchType::SEARCH_SUGGEST); 3071 provider_.get(), 0, true, AutocompleteMatchType::SEARCH_SUGGEST);
3072 match.RecordAdditionalInfo( 3072 match.RecordAdditionalInfo(
3073 SearchProvider::kDeletionUrlKey, 3073 SearchProvider::kDeletionUrlKey,
3074 "https://www.google.com/complete/deleteitem?q=foo"); 3074 "https://www.google.com/complete/deleteitem?q=foo");
3075 3075
3076 // Test a successful deletion request. 3076 // Test a successful deletion request.
3077 provider_->matches_.push_back(match); 3077 provider_->matches_.push_back(match);
3078 provider_->DeleteMatch(match); 3078 provider_->DeleteMatch(match);
3079 EXPECT_FALSE(provider_->deletion_handlers_.empty()); 3079 EXPECT_FALSE(provider_->deletion_handlers_.empty());
3080 EXPECT_TRUE(provider_->matches_.empty()); 3080 EXPECT_TRUE(provider_->matches_.empty());
3081 // Set up a default fetcher with provided results. 3081 // Set up a default fetcher with provided results.
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
3259 AutocompleteInput input(base::ASCIIToUTF16("weather l"), 3259 AutocompleteInput input(base::ASCIIToUTF16("weather l"),
3260 base::string16::npos, base::string16(), GURL(), 3260 base::string16::npos, base::string16(), GURL(),
3261 metrics::OmniboxEventProto::INVALID_SPEC, false, 3261 metrics::OmniboxEventProto::INVALID_SPEC, false,
3262 false, true, true, 3262 false, true, true,
3263 ChromeAutocompleteSchemeClassifier(&profile_)); 3263 ChromeAutocompleteSchemeClassifier(&profile_));
3264 provider_->DoAnswersQuery(input); 3264 provider_->DoAnswersQuery(input);
3265 EXPECT_EQ(base::ASCIIToUTF16("weather los angeles"), 3265 EXPECT_EQ(base::ASCIIToUTF16("weather los angeles"),
3266 provider_->prefetch_data_.full_query_text); 3266 provider_->prefetch_data_.full_query_text);
3267 EXPECT_EQ(base::ASCIIToUTF16("2334"), provider_->prefetch_data_.query_type); 3267 EXPECT_EQ(base::ASCIIToUTF16("2334"), provider_->prefetch_data_.query_type);
3268 } 3268 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/history_quick_provider_unittest.cc ('k') | chrome/browser/autocomplete/shortcuts_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698