Commit fbb6a5d4 authored by Jonathan Freed's avatar Jonathan Freed Committed by Commit Bot

[Feed] Fixing scroll state issue when returning to the feed.

Bug: 998907, 1013648
Change-Id: I8925f0d1a4cf7a5c58097ecc0a6e2f31bebd8d5a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1874092Reviewed-by: default avatarDan H <harringtond@chromium.org>
Commit-Queue: Jonathan Freed <freedjm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709154}
parent 950533a3
...@@ -22,7 +22,7 @@ public final class FeedConfiguration { ...@@ -22,7 +22,7 @@ public final class FeedConfiguration {
private static final String ABANDON_RESTORE_BELOW_FOLD = "abandon_restore_below_fold"; private static final String ABANDON_RESTORE_BELOW_FOLD = "abandon_restore_below_fold";
/** Default value for whether to restore below fold. */ /** Default value for whether to restore below fold. */
public static final boolean ABANDON_RESTORE_BELOW_FOLD_DEFAULT = true; public static final boolean ABANDON_RESTORE_BELOW_FOLD_DEFAULT = false;
private static final String CARD_MENU_TOOLTIP_ELIGIBLE = "card_menu_tooltip_eligible"; private static final String CARD_MENU_TOOLTIP_ELIGIBLE = "card_menu_tooltip_eligible";
/** Default value for if card menus should have tooltips enabled. */ /** Default value for if card menus should have tooltips enabled. */
...@@ -35,7 +35,7 @@ public final class FeedConfiguration { ...@@ -35,7 +35,7 @@ public final class FeedConfiguration {
private static final String CONSUME_SYNTHETIC_TOKENS_WHILE_RESTORING = private static final String CONSUME_SYNTHETIC_TOKENS_WHILE_RESTORING =
"consume_synthetic_tokens_while_restoring_bool"; "consume_synthetic_tokens_while_restoring_bool";
/** Default value for whether to consumer synthetic tokens on restore. */ /** Default value for whether to consumer synthetic tokens on restore. */
public static final boolean CONSUME_SYNTHETIC_TOKENS_WHILE_RESTORING_DEFAULT = false; public static final boolean CONSUME_SYNTHETIC_TOKENS_WHILE_RESTORING_DEFAULT = true;
private static final String DEFAULT_ACTION_TTL_SECONDS = "default_action_ttl_seconds"; private static final String DEFAULT_ACTION_TTL_SECONDS = "default_action_ttl_seconds";
/** Default value for the TTL of default action (3 days). */ /** Default value for the TTL of default action (3 days). */
......
...@@ -405,14 +405,14 @@ public class FeedConfigurationTest { ...@@ -405,14 +405,14 @@ public class FeedConfigurationTest {
@Features.EnableFeatures({ChromeFeatureList.INTEREST_FEED_CONTENT_SUGGESTIONS}) @Features.EnableFeatures({ChromeFeatureList.INTEREST_FEED_CONTENT_SUGGESTIONS})
public void testCreateConfiguration() { public void testCreateConfiguration() {
Configuration configuration = FeedConfiguration.createConfiguration(); Configuration configuration = FeedConfiguration.createConfiguration();
Assert.assertTrue( Assert.assertFalse(
configuration.getValueOrDefault(ConfigKey.ABANDON_RESTORE_BELOW_FOLD, false)); configuration.getValueOrDefault(ConfigKey.ABANDON_RESTORE_BELOW_FOLD, true));
Assert.assertFalse( Assert.assertFalse(
configuration.getValueOrDefault(ConfigKey.CARD_MENU_TOOLTIP_ELIGIBLE, true)); configuration.getValueOrDefault(ConfigKey.CARD_MENU_TOOLTIP_ELIGIBLE, true));
Assert.assertFalse( Assert.assertFalse(
configuration.getValueOrDefault(ConfigKey.CONSUME_SYNTHETIC_TOKENS, true)); configuration.getValueOrDefault(ConfigKey.CONSUME_SYNTHETIC_TOKENS, true));
Assert.assertFalse(configuration.getValueOrDefault( Assert.assertTrue(configuration.getValueOrDefault(
ConfigKey.CONSUME_SYNTHETIC_TOKENS_WHILE_RESTORING, true)); ConfigKey.CONSUME_SYNTHETIC_TOKENS_WHILE_RESTORING, false));
Assert.assertEquals((long) FeedConfiguration.DEFAULT_ACTION_TTL_SECONDS_DEFAULT, Assert.assertEquals((long) FeedConfiguration.DEFAULT_ACTION_TTL_SECONDS_DEFAULT,
configuration.getValueOrDefault(ConfigKey.DEFAULT_ACTION_TTL_SECONDS, 0)); configuration.getValueOrDefault(ConfigKey.DEFAULT_ACTION_TTL_SECONDS, 0));
Assert.assertEquals(FeedConfiguration.FEED_ACTION_SERVER_ENDPOINT_DEFAULT, Assert.assertEquals(FeedConfiguration.FEED_ACTION_SERVER_ENDPOINT_DEFAULT,
......
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