Commit 0c9293a6 authored by Donn Denman's avatar Donn Denman Committed by Commit Bot

[TTS] Update longpress feature experiment arms.

Updates the "Long-press Resolves" Feature to only have one experiment
arm.  We had a few others, but when talking with privacy it became
pretty clear that we only need one.

BUG=956277

Change-Id: I7404fd87656f144b36e44671a17f03546979fb7e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1971226
Auto-Submit: Donn Denman <donnd@chromium.org>
Reviewed-by: default avatarJinsuk Kim <jinsukkim@chromium.org>
Commit-Queue: Donn Denman <donnd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#726984}
parent 4baa9a6e
......@@ -24,10 +24,6 @@ import java.lang.annotation.RetentionPolicy;
public class ContextualSearchFieldTrial {
//==========================================================================================
// Public settings synchronized with src/components/contextual_search/core/browser/public.cc
//==========================================================================================
public static final String LONGPRESS_RESOLVE_PARAM_NAME = "longpress_resolve_variation";
public static final String LONGPRESS_RESOLVE_PRESERVE_TAP = "3";
//==========================================================================================
private static final String FIELD_TRIAL_NAME = "ContextualSearch";
private static final String DISABLED_PARAM = "disabled";
......
......@@ -112,8 +112,6 @@ class ContextualSearchPolicy {
* @return Whether a Tap gesture is currently supported as a trigger for the feature.
*/
boolean isTapSupported() {
if (isTapDisabledDueToLongpress()) return false;
return (!isUserUndecided()
|| ContextualSearchFieldTrial.getSwitch(
ContextualSearchSwitch
......@@ -256,15 +254,6 @@ class ContextualSearchPolicy {
&& (selectionType == SelectionType.LONG_PRESS || !shouldPreviousGestureResolve()));
}
/** @return whether Tap is disabled due to the longpress experiment. */
private boolean isTapDisabledDueToLongpress() {
return ChromeFeatureList.isEnabled(ChromeFeatureList.CONTEXTUAL_SEARCH_LONGPRESS_RESOLVE)
&& !ContextualSearchFieldTrial.LONGPRESS_RESOLVE_PRESERVE_TAP.equals(
ChromeFeatureList.getFieldTrialParamByFeature(
ChromeFeatureList.CONTEXTUAL_SEARCH_LONGPRESS_RESOLVE,
ContextualSearchFieldTrial.LONGPRESS_RESOLVE_PARAM_NAME));
}
/**
* Determines whether an error from a search term resolution request should
* be shown to the user, or not.
......
......@@ -3140,18 +3140,4 @@ public class ContextualSearchManagerTest {
assertPanelClosedOrUndefined();
assertLoadedNoUrl();
}
@Test
@SmallTest
@Feature({"ContextualSearch"})
@CommandLineFlags.Add({"enable-features=ContextualSearchLongpressResolve<FakeStudyName",
"force-fieldtrials=FakeStudyName/FakeGroup",
"force-fieldtrial-params=FakeStudyName.FakeGroup:longpress_resolve_variation/"
+ ContextualSearchFieldTrial.LONGPRESS_RESOLVE_PRESERVE_TAP})
public void
testTapNotIgnoredWithLongpressResolveEnabledAndVariationPreserveTap() throws TimeoutException {
clickWordNode("states");
Assert.assertEquals("States", getSelectedText());
waitForPanelToPeek();
}
}
......@@ -1112,12 +1112,6 @@ const FeatureEntry::FeatureVariation kExploreSitesVariations[] = {
base::size(kExploreSitesDenseTitleBottom), nullptr},
{"Dense Title Right", kExploreSitesDenseTitleRight,
base::size(kExploreSitesDenseTitleRight), nullptr}};
const FeatureEntry::FeatureParam kLongpressResolvePreserveTap = {
contextual_search::kLongpressResolveParamName,
contextual_search::kLongpressResolvePreserveTap};
const FeatureEntry::FeatureVariation kLongpressResolveVariations[] = {
{"and preserve Tap behavior", &kLongpressResolvePreserveTap, 1, nullptr},
};
#endif // defined(OS_ANDROID)
......@@ -1574,10 +1568,7 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kContextualSearchLongpressResolveName,
flag_descriptions::kContextualSearchLongpressResolveDescription,
kOsAndroid,
FEATURE_WITH_PARAMS_VALUE_TYPE(
chrome::android::kContextualSearchLongpressResolve,
kLongpressResolveVariations,
"ContextualSearchLongpressResolve")},
FEATURE_VALUE_TYPE(chrome::android::kContextualSearchLongpressResolve)},
{"contextual-search-ml-tap-suppression",
flag_descriptions::kContextualSearchMlTapSuppressionName,
......
......@@ -8,12 +8,6 @@ namespace contextual_search {
const char kContextualSearchFieldTrialName[] = "ContextualSearch";
// Longpress Resolve variations:
const char kLongpressResolveParamName[] = "longpress_resolve_variation";
const char kLongpressResolveHideOnScroll[] = "1";
const char kLongpressResolvePrivacyAggressive[] = "2";
const char kLongpressResolvePreserveTap[] = "3";
// Contextual Cards variations and integration Api settings.
const char kContextualCardsVersionParamName[] = "contextual_cards_version";
// The version of the Contextual Cards API that we want to invoke.
......
......@@ -30,12 +30,6 @@ extern const int kContextualCardsTranslationsIntegration;
// Support of unlimited cards with diagnostics enabled, for development.
extern const int kContextualCardsDiagnosticIntegration;
// Longpress resolve variations:
extern const char kLongpressResolveParamName[];
extern const char kLongpressResolveHideOnScroll[];
extern const char kLongpressResolvePrivacyAggressive[];
extern const char kLongpressResolvePreserveTap[];
} // namespace contextual_search
#endif // COMPONENTS_CONTEXTUAL_SEARCH_CORE_BROWSER_PUBLIC_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment