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

Side by Side Diff: components/search/search_unittest.cc

Issue 684513002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/search/search.h" 5 #include "components/search/search.h"
6 6
7 #include "base/metrics/field_trial.h" 7 #include "base/metrics/field_trial.h"
8 #include "base/metrics/statistics_recorder.h" 8 #include "base/metrics/statistics_recorder.h"
9 #include "components/variations/entropy_provider.h" 9 #include "components/variations/entropy_provider.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 namespace chrome { 12 namespace chrome {
13 13
14 class EmbeddedSearchFieldTrialTest : public testing::Test { 14 class EmbeddedSearchFieldTrialTest : public testing::Test {
15 protected: 15 protected:
16 virtual void SetUp() { 16 void SetUp() override {
17 field_trial_list_.reset(new base::FieldTrialList( 17 field_trial_list_.reset(new base::FieldTrialList(
18 new metrics::SHA1EntropyProvider("42"))); 18 new metrics::SHA1EntropyProvider("42")));
19 base::StatisticsRecorder::Initialize(); 19 base::StatisticsRecorder::Initialize();
20 } 20 }
21 21
22 private: 22 private:
23 scoped_ptr<base::FieldTrialList> field_trial_list_; 23 scoped_ptr<base::FieldTrialList> field_trial_list_;
24 }; 24 };
25 25
26 TEST_F(EmbeddedSearchFieldTrialTest, GetFieldTrialInfoEmptyAndValid) { 26 TEST_F(EmbeddedSearchFieldTrialTest, GetFieldTrialInfoEmptyAndValid) {
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 EXPECT_TRUE(ShouldHideTopVerbatimMatch()); 156 EXPECT_TRUE(ShouldHideTopVerbatimMatch());
157 } 157 }
158 158
159 TEST_F(ShouldHideTopVerbatimTest, DisableByFlag) { 159 TEST_F(ShouldHideTopVerbatimTest, DisableByFlag) {
160 ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial("EmbeddedSearch", 160 ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial("EmbeddedSearch",
161 "Group1 hide_verbatim:0")); 161 "Group1 hide_verbatim:0"));
162 EXPECT_FALSE(ShouldHideTopVerbatimMatch()); 162 EXPECT_FALSE(ShouldHideTopVerbatimMatch());
163 } 163 }
164 164
165 } // namespace chrome 165 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698