Commit 7f8fb9d6 authored by Wei-Yin Chen (陳威尹)'s avatar Wei-Yin Chen (陳威尹) Committed by Commit Bot

Fix TabSwitcherCoordinator#getSoftCleanupDelayForTesting

TabSwitcherCoordinator#getSoftCleanupDelayForTesting wrongly returned
the value of getCleanupDelayForTesting.

Bug: 983170
Change-Id: I5747b7e9bd8feee743de9268cc090820f5ec4ec8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1916259Reviewed-by: default avatarMei Liang <meiliang@chromium.org>
Commit-Queue: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#715392}
parent ce69001c
...@@ -258,10 +258,10 @@ public class StartSurfaceLayoutTest { ...@@ -258,10 +258,10 @@ public class StartSurfaceLayoutTest {
@MediumTest @MediumTest
// clang-format off // clang-format off
@Features.DisableFeatures(ChromeFeatureList.TAB_TO_GTS_ANIMATION) @Features.DisableFeatures(ChromeFeatureList.TAB_TO_GTS_ANIMATION)
@CommandLineFlags.Add({BASE_PARAMS + "/soft-cleanup-delay/10000/cleanup-delay/10000"}) @CommandLineFlags.Add({BASE_PARAMS + "/soft-cleanup-delay/9000/cleanup-delay/10000"})
public void testTabToGridFromLiveTabWarm() throws InterruptedException { public void testTabToGridFromLiveTabWarm() throws InterruptedException {
// clang-format on // clang-format on
assertEquals(10000, mTabListDelegate.getSoftCleanupDelayForTesting()); assertEquals(9000, mTabListDelegate.getSoftCleanupDelayForTesting());
assertEquals(10000, mTabListDelegate.getCleanupDelayForTesting()); assertEquals(10000, mTabListDelegate.getCleanupDelayForTesting());
prepareTabs(2, 0, NTP_URL); prepareTabs(2, 0, NTP_URL);
...@@ -289,6 +289,9 @@ public class StartSurfaceLayoutTest { ...@@ -289,6 +289,9 @@ public class StartSurfaceLayoutTest {
@CommandLineFlags.Add({BASE_PARAMS + "/cleanup-delay/10000"}) @CommandLineFlags.Add({BASE_PARAMS + "/cleanup-delay/10000"})
public void testTabToGridFromLiveTabSoft() throws InterruptedException { public void testTabToGridFromLiveTabSoft() throws InterruptedException {
// clang-format on // clang-format on
assertEquals(0, mTabListDelegate.getSoftCleanupDelayForTesting());
assertEquals(10000, mTabListDelegate.getCleanupDelayForTesting());
prepareTabs(2, 0, NTP_URL); prepareTabs(2, 0, NTP_URL);
testTabToGrid(mUrl); testTabToGrid(mUrl);
} }
......
...@@ -242,7 +242,7 @@ public class TabSwitcherCoordinator implements Destroyable, TabSwitcher, ...@@ -242,7 +242,7 @@ public class TabSwitcherCoordinator implements Destroyable, TabSwitcher,
@Override @Override
@VisibleForTesting @VisibleForTesting
public int getSoftCleanupDelayForTesting() { public int getSoftCleanupDelayForTesting() {
return mMediator.getCleanupDelayForTesting(); return mMediator.getSoftCleanupDelayForTesting();
} }
@Override @Override
......
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