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

Side by Side Diff: chrome/browser/search/search_unittest.cc

Issue 648653003: Standardize usage of virtual/override/final in chrome/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/metrics/field_trial.h" 6 #include "base/metrics/field_trial.h"
7 #include "base/metrics/histogram_base.h" 7 #include "base/metrics/histogram_base.h"
8 #include "base/metrics/histogram_samples.h" 8 #include "base/metrics/histogram_samples.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 for (size_t i = 0; i < arraysize(kTestCases); ++i) { 752 for (size_t i = 0; i < arraysize(kTestCases); ++i) {
753 const QueryExtractionAllowedTestCase& test = kTestCases[i]; 753 const QueryExtractionAllowedTestCase& test = kTestCases[i];
754 EXPECT_EQ(test.expected_result, 754 EXPECT_EQ(test.expected_result,
755 chrome::IsQueryExtractionAllowedForURL(profile(), GURL(test.url))) 755 chrome::IsQueryExtractionAllowedForURL(profile(), GURL(test.url)))
756 << test.url << " " << test.comment; 756 << test.url << " " << test.comment;
757 } 757 }
758 } 758 }
759 759
760 class SearchURLTest : public SearchTest { 760 class SearchURLTest : public SearchTest {
761 protected: 761 protected:
762 virtual void SetSearchProvider(bool set_ntp_url, bool insecure_ntp_url) 762 void SetSearchProvider(bool set_ntp_url, bool insecure_ntp_url) override {
763 override {
764 TemplateURLService* template_url_service = 763 TemplateURLService* template_url_service =
765 TemplateURLServiceFactory::GetForProfile(profile()); 764 TemplateURLServiceFactory::GetForProfile(profile());
766 TemplateURLData data; 765 TemplateURLData data;
767 data.SetURL("{google:baseURL}search?" 766 data.SetURL("{google:baseURL}search?"
768 "{google:instantExtendedEnabledParameter}q={searchTerms}"); 767 "{google:instantExtendedEnabledParameter}q={searchTerms}");
769 data.search_terms_replacement_key = "espv"; 768 data.search_terms_replacement_key = "espv";
770 template_url_ = new TemplateURL(data); 769 template_url_ = new TemplateURL(data);
771 // |template_url_service| takes ownership of |template_url_|. 770 // |template_url_service| takes ownership of |template_url_|.
772 template_url_service->Add(template_url_); 771 template_url_service->Add(template_url_);
773 template_url_service->SetUserSelectedDefaultSearchProvider(template_url_); 772 template_url_service->SetUserSelectedDefaultSearchProvider(template_url_);
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 } 1004 }
1006 1005
1007 TEST_F(OriginChipTest, CommandLineOnSrp) { 1006 TEST_F(OriginChipTest, CommandLineOnSrp) {
1008 CommandLine::ForCurrentProcess()->AppendSwitch( 1007 CommandLine::ForCurrentProcess()->AppendSwitch(
1009 switches::kEnableOriginChipOnSrp); 1008 switches::kEnableOriginChipOnSrp);
1010 EXPECT_TRUE(ShouldDisplayOriginChip()); 1009 EXPECT_TRUE(ShouldDisplayOriginChip());
1011 EXPECT_EQ(ORIGIN_CHIP_ON_SRP, GetOriginChipCondition()); 1010 EXPECT_EQ(ORIGIN_CHIP_ON_SRP, GetOriginChipCondition());
1012 } 1011 }
1013 1012
1014 } // namespace chrome 1013 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/search/search_terms_tracker.h ('k') | chrome/browser/search/suggestions/image_fetcher_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698