diff options
author | dschuyler <dschuyler@chromium.org> | 2015-06-10 12:22:23 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-10 19:22:53 +0000 |
commit | 1c28401c698ce3240dc83010b58021fd1ef5f3e6 (patch) | |
tree | f4ccb1c9e0dd0604a6336f01921d35eff9de8452 /components/search | |
parent | 9ea60d8ecacbccac0221c7f576ef19d6635de1cd (diff) | |
download | chromium_src-1c28401c698ce3240dc83010b58021fd1ef5f3e6.zip chromium_src-1c28401c698ce3240dc83010b58021fd1ef5f3e6.tar.gz chromium_src-1c28401c698ce3240dc83010b58021fd1ef5f3e6.tar.bz2 |
Remove ShouldHideTopMatch
BUG=492452
Review URL: https://codereview.chromium.org/1154063003
Cr-Commit-Position: refs/heads/master@{#333772}
Diffstat (limited to 'components/search')
-rw-r--r-- | components/search/search.cc | 8 | ||||
-rw-r--r-- | components/search/search.h | 5 | ||||
-rw-r--r-- | components/search/search_unittest.cc | 32 |
3 files changed, 0 insertions, 45 deletions
diff --git a/components/search/search.cc b/components/search/search.cc index c2d4b4e..9afd666 100644 --- a/components/search/search.cc +++ b/components/search/search.cc @@ -35,8 +35,6 @@ const uint64 kEmbeddedSearchEnabledVersion = 2; const uint64 kEmbeddedPageVersionDefault = 2; #endif -const char kHideVerbatimFlagName[] = "hide_verbatim"; - // Constants for the field trial name and group prefix. // Note in M30 and below this field trial was named "InstantExtended" and in // M31 was renamed to EmbeddedSearch for clarity and cleanliness. Since we @@ -145,10 +143,4 @@ bool GetBoolValueForFlagWithDefault(const std::string& flag, return !!GetUInt64ValueForFlagWithDefault(flag, default_value ? 1 : 0, flags); } -bool ShouldHideTopVerbatimMatch() { - FieldTrialFlags flags; - return GetFieldTrialInfo(&flags) && GetBoolValueForFlagWithDefault( - kHideVerbatimFlagName, false, flags); -} - } // namespace chrome diff --git a/components/search/search.h b/components/search/search.h index 9558ee8..0a7a55b 100644 --- a/components/search/search.h +++ b/components/search/search.h @@ -55,11 +55,6 @@ bool GetBoolValueForFlagWithDefault(const std::string& flag, bool default_value, const FieldTrialFlags& flags); -// Returns true if 'hide_verbatim' flag is enabled in field trials -// to hide the top match in the native suggestions dropdown if it is a verbatim -// match. See comments on ShouldHideTopMatch in autocomplete_result.h. -bool ShouldHideTopVerbatimMatch(); - } // namespace chrome #endif // COMPONENTS_SEARCH_SEARCH_H_ diff --git a/components/search/search_unittest.cc b/components/search/search_unittest.cc index d3bd873..2fd5a23 100644 --- a/components/search/search_unittest.cc +++ b/components/search/search_unittest.cc @@ -130,36 +130,4 @@ TEST_F(EmbeddedSearchFieldTrialTest, GetFieldTrialInfoControlFlags) { EXPECT_EQ(3ul, flags.size()); } -typedef EmbeddedSearchFieldTrialTest ShouldHideTopVerbatimTest; - -TEST_F(ShouldHideTopVerbatimTest, DoNotHideByDefault) { - ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial("EmbeddedSearch", - "Control")); - EXPECT_FALSE(ShouldHideTopVerbatimMatch()); -} - -TEST_F(ShouldHideTopVerbatimTest, DoNotHideInInstantExtended) { - ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial("EmbeddedSearch", - "Group1")); - EXPECT_FALSE(ShouldHideTopVerbatimMatch()); -} - -TEST_F(ShouldHideTopVerbatimTest, EnableByFlagInInstantExtended) { - ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial("EmbeddedSearch", - "Group1 hide_verbatim:1")); - EXPECT_TRUE(ShouldHideTopVerbatimMatch()); -} - -TEST_F(ShouldHideTopVerbatimTest, EnableByFlagOutsideInstantExtended) { - ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial( - "EmbeddedSearch", "Controll1 hide_verbatim:1")); - EXPECT_TRUE(ShouldHideTopVerbatimMatch()); -} - -TEST_F(ShouldHideTopVerbatimTest, DisableByFlag) { - ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial("EmbeddedSearch", - "Group1 hide_verbatim:0")); - EXPECT_FALSE(ShouldHideTopVerbatimMatch()); -} - } // namespace chrome |