Skip to content

Commit

Permalink
Revert "Reland "[Tab Switcher] Refactor - moved aspect ratio determin…
Browse files Browse the repository at this point in the history
…ation to helper method. Added static aspect ratio for tablet. Added a couple unit tests for new method in TabUtils""

This reverts commit 889456d.

Reason for revert: https://bugs.chromium.org/p/chromium/issues/detail?id=1311467

Original change's description:
> Reland "[Tab Switcher] Refactor - moved aspect ratio determination to helper method. Added static aspect ratio for tablet. Added a couple unit tests for new method in TabUtils"
>
> This reverts commit 9529540.
>
> Reason for revert: Fixed failing tests
>
> Original change's description:
> > Revert "[Tab Switcher] Refactor - moved aspect ratio determination to helper method. Added static aspect ratio for tablet. Added a couple unit tests for new method in TabUtils"
> >
> > This reverts commit 2d51190.
> >
> > Reason for revert: Broke some StartSurfaceLayoutTest tests
> >
> > Original change's description:
> > > [Tab Switcher] Refactor - moved aspect ratio determination to helper method. Added static aspect ratio for tablet. Added a couple unit tests for new method in TabUtils
> > >
> > > Screenshots:
> > > Phone: http://shortn/_61BeuUTPE1
> > > Tablet: http://shortn/_XDY0zwNuJO
> > >
> > > This is a reland for CL https://chromium-review.googlesource.com/c/chromium/src/+/3473394
> > >
> > > Bug: 1298973
> > > Change-Id: If105d1333f3dd88166d9e9e24620b22bf39bd64f
> > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3481258
> > > Reviewed-by: Theresa Sullivan <twellington@chromium.org>
> > > Reviewed-by: Neil Coronado <nemco@google.com>
> > > Commit-Queue: Sirisha Kavuluru <skavuluru@google.com>
> > > Cr-Commit-Position: refs/heads/main@{#974038}
> >
> > Bug: 1298973, 1300179
> > Change-Id: If0cda3b4894651aea81eccf2a543c3c1c6676aea
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3484257
> > Auto-Submit: Andrew Grieve <agrieve@chromium.org>
> > Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> > Cr-Commit-Position: refs/heads/main@{#974183}
>
> Bug: 1298973, 1300179
> Change-Id: I113c8bbec12559bc8a6c7f3936ad0f1f682aae39
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3489366
> Reviewed-by: Theresa Sullivan <twellington@chromium.org>
> Commit-Queue: Sirisha Kavuluru <skavuluru@google.com>
> Cr-Commit-Position: refs/heads/main@{#975328}

Bug: 1298973, 1300179
Change-Id: I999cc7f092a75104ecc5df714ccfc986270b8fc2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3561228
Reviewed-by: Theresa Sullivan <twellington@chromium.org>
Reviewed-by: Sirisha Kavuluru <skavuluru@google.com>
Cr-Commit-Position: refs/branch-heads/4974@{#9}
Cr-Branched-From: 89f4767-refs/heads/main@{#986924}
  • Loading branch information
Sirisha Kavuluru authored and Krishna Govind committed Mar 30, 2022
1 parent 3ff3c71 commit 1c32a70
Show file tree
Hide file tree
Showing 19 changed files with 197 additions and 176 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import androidx.vectordrawable.graphics.drawable.AnimationUtilsCompat;

import org.chromium.base.Log;
import org.chromium.base.MathUtils;
import org.chromium.base.TraceEvent;
import org.chromium.base.jank_tracker.JankScenario;
import org.chromium.base.jank_tracker.JankTracker;
Expand All @@ -41,7 +42,6 @@
import org.chromium.chrome.browser.layouts.animation.CompositorAnimator;
import org.chromium.chrome.browser.layouts.scene_layer.SceneLayer;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.chrome.browser.tab.TabUtils;
import org.chromium.chrome.browser.tabmodel.TabModelSelector;
import org.chromium.chrome.browser.tasks.ReturnToChromeExperimentsUtil;
import org.chromium.chrome.browser.tasks.TasksSurface;
Expand Down Expand Up @@ -187,7 +187,10 @@ public void finishedHiding() {
};

mController.addOverviewModeObserver(mStartSurfaceObserver);
mThumbnailAspectRatio = TabUtils.getTabThumbnailAspectRatio(getContext());
if (TabUiFeatureUtilities.isTabThumbnailAspectRatioNotOne()) {
mThumbnailAspectRatio = (float) TabUiFeatureUtilities.THUMBNAIL_ASPECT_RATIO.getValue();
mThumbnailAspectRatio = MathUtils.clamp(mThumbnailAspectRatio, 0.5f, 2.0f);
}
}

@Override
Expand Down Expand Up @@ -512,8 +515,10 @@ private void showOverviewWithTabShrink(boolean animate, Supplier<Rect> target,
// down, making the "create group" visible for a while.
animationList.add(CompositorAnimator.ofWritableFloatPropertyKey(handler, sourceLayoutTab,
LayoutTab.MAX_CONTENT_HEIGHT, sourceLayoutTab.getUnclampedOriginalContentHeight(),
Math.min(getWidth() / mThumbnailAspectRatio,
sourceLayoutTab.getUnclampedOriginalContentHeight()),
TabUiFeatureUtilities.isTabThumbnailAspectRatioNotOne()
? Math.min(getWidth() / mThumbnailAspectRatio,
sourceLayoutTab.getUnclampedOriginalContentHeight())
: getWidth(),
ZOOMING_DURATION, Interpolators.FAST_OUT_SLOW_IN_INTERPOLATOR));

CompositorAnimator backgroundAlpha =
Expand Down Expand Up @@ -566,8 +571,10 @@ private void expandTab(Rect source) {
// down, making the "create group" visible for a while.
animationList.add(CompositorAnimator.ofWritableFloatPropertyKey(handler, sourceLayoutTab,
LayoutTab.MAX_CONTENT_HEIGHT,
Math.min(getWidth() / mThumbnailAspectRatio,
sourceLayoutTab.getUnclampedOriginalContentHeight()),
TabUiFeatureUtilities.isTabThumbnailAspectRatioNotOne()
? Math.min(getWidth() / mThumbnailAspectRatio,
sourceLayoutTab.getUnclampedOriginalContentHeight())
: getWidth(),
sourceLayoutTab.getUnclampedOriginalContentHeight(), ZOOMING_DURATION,
Interpolators.FAST_OUT_SLOW_IN_INTERPOLATOR));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import org.junit.Test;
import org.junit.runner.RunWith;

import org.chromium.base.MathUtils;
import org.chromium.base.metrics.RecordHistogram;
import org.chromium.base.test.params.ParameterAnnotations;
import org.chromium.base.test.params.ParameterAnnotations.UseMethodParameter;
Expand Down Expand Up @@ -72,6 +73,7 @@
import org.chromium.chrome.browser.tasks.ReturnToChromeExperimentsUtil;
import org.chromium.chrome.browser.tasks.pseudotab.PseudoTab;
import org.chromium.chrome.browser.tasks.pseudotab.TabAttributeCache;
import org.chromium.chrome.browser.tasks.tab_management.TabUiFeatureUtilities;
import org.chromium.chrome.browser.tasks.tab_management.TabUiTestHelper;
import org.chromium.chrome.test.ChromeJUnit4RunnerDelegate;
import org.chromium.chrome.test.ChromeTabbedActivityTestRule;
Expand Down Expand Up @@ -433,8 +435,10 @@ public void testSingleAsHomepage_Landscape_TabSize() {
onViewWaiting(allOf(withId(org.chromium.chrome.test.R.id.tab_thumbnail), isDisplayed()));

View tabThumbnail = cta.findViewById(org.chromium.chrome.test.R.id.tab_thumbnail);
float defaultRatio = (float) TabUiFeatureUtilities.THUMBNAIL_ASPECT_RATIO.getValue();
defaultRatio = MathUtils.clamp(defaultRatio, 0.5f, 2.0f);
assertEquals(tabThumbnail.getMeasuredHeight(),
(int) (tabThumbnail.getMeasuredWidth() * 1.0 / 0.85f), 2);
(int) (tabThumbnail.getMeasuredWidth() * 1.0 / defaultRatio), 2);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public void tearDown() {
@Restriction({Restriction.RESTRICTION_TYPE_NON_LOW_END_DEVICE,
UiRestriction.RESTRICTION_TYPE_PHONE, UiRestriction.RESTRICTION_TYPE_TABLET})
@CommandLineFlags.Add({ChromeSwitches.DISABLE_NATIVE_INITIALIZATION,
"force-fieldtrial-params=Study.Group:allow_to_refetch/true"})
"force-fieldtrial-params=Study.Group:allow_to_refetch/true/thumbnail_aspect_ratio/2.0"})
public void fetchThumbnailsPreNativeTest() {
// clang-format on
StartSurfaceTestUtils.startMainActivityFromLauncher(mActivityTestRule);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.action.ViewActions.click;
import static androidx.test.espresso.action.ViewActions.swipeUp;
import static androidx.test.espresso.assertion.ViewAssertions.doesNotExist;
import static androidx.test.espresso.assertion.ViewAssertions.matches;
import static androidx.test.espresso.contrib.RecyclerViewActions.actionOnItemAtPosition;
Expand Down Expand Up @@ -169,7 +168,7 @@
@Restriction(
{UiRestriction.RESTRICTION_TYPE_PHONE, Restriction.RESTRICTION_TYPE_NON_LOW_END_DEVICE})
@DisableIf.Build(message = "Flaky on emulators; see https://crbug.com/1130830",
supported_abis_includes = "x86")
supported_abis_includes = "x86")
public class StartSurfaceLayoutTest {
// clang-format on
private static final String BASE_PARAMS = "force-fieldtrial-params="
Expand Down Expand Up @@ -869,7 +868,8 @@ private int getTabCountInCurrentTabModel() {
@EnableFeatures({ChromeFeatureList.CLOSE_TAB_SUGGESTIONS + "<Study",
ChromeFeatureList.TAB_TO_GTS_ANIMATION + "<Study"})
@CommandLineFlags.Add({BASE_PARAMS + "/baseline_tab_suggestions/true" +
"/baseline_close_tab_suggestions/true/min_time_between_prefetches/0"})
"/baseline_close_tab_suggestions/true/min_time_between_prefetches/0/"
+ "thumbnail_aspect_ratio/1.0"})
public void testTabSuggestionMessageCard_dismiss() throws InterruptedException {
// clang-format on
prepareTabs(3, 0, null);
Expand All @@ -887,7 +887,6 @@ public void testTabSuggestionMessageCard_dismiss() throws InterruptedException {
// TabSwitcherCoordinator::hasAppendedMessagesForTesting. Instead, we can query the number
// of items that the inner model of the TabSwitcher has.
CriteriaHelper.pollUiThread(TabSwitcherCoordinator::hasAppendedMessagesForTesting);
onView(tabSwitcherViewMatcher()).perform(swipeUp());
onView(withId(R.id.tab_grid_message_item)).check(matches(isDisplayed()));
onView(allOf(withId(R.id.close_button), withParent(withId(R.id.tab_grid_message_item))))
.perform(click());
Expand All @@ -901,7 +900,8 @@ public void testTabSuggestionMessageCard_dismiss() throws InterruptedException {
@EnableFeatures({ChromeFeatureList.CLOSE_TAB_SUGGESTIONS + "<Study",
ChromeFeatureList.TAB_TO_GTS_ANIMATION + "<Study"})
@CommandLineFlags.Add({BASE_PARAMS + "/baseline_tab_suggestions/true" +
"/baseline_close_tab_suggestions/true/min_time_between_prefetches/0"})
"/baseline_close_tab_suggestions/true/min_time_between_prefetches/0"
+ "/thumbnail_aspect_ratio/1.0"})
public void testTabSuggestionMessageCard_review() throws InterruptedException {
// clang-format on
prepareTabs(3, 0, null);
Expand All @@ -913,7 +913,6 @@ public void testTabSuggestionMessageCard_review() throws InterruptedException {
enterGTSWithThumbnailChecking();

CriteriaHelper.pollUiThread(TabSwitcherCoordinator::hasAppendedMessagesForTesting);
onView(tabSwitcherViewMatcher()).perform(swipeUp());
onView(withId(R.id.tab_grid_message_item)).check(matches(isDisplayed()));
onView(allOf(withId(R.id.action_button), withParent(withId(R.id.tab_grid_message_item))))
.perform(click());
Expand All @@ -934,7 +933,8 @@ public void testTabSuggestionMessageCard_review() throws InterruptedException {
@EnableFeatures({ChromeFeatureList.CLOSE_TAB_SUGGESTIONS + "<Study",
ChromeFeatureList.TAB_TO_GTS_ANIMATION + "<Study"})
@CommandLineFlags.Add({BASE_PARAMS + "/baseline_tab_suggestions/true" +
"/baseline_close_tab_suggestions/true/min_time_between_prefetches/0"})
"/baseline_close_tab_suggestions/true/min_time_between_prefetches/0/"
+ "thumbnail_aspect_ratio/1.0"})
public void testShowOnlyOneTabSuggestionMessageCard_withSoftCleanup()
throws InterruptedException {
// clang-format on
Expand All @@ -948,7 +948,8 @@ public void testShowOnlyOneTabSuggestionMessageCard_withSoftCleanup()
@EnableFeatures({ChromeFeatureList.CLOSE_TAB_SUGGESTIONS + "<Study",
ChromeFeatureList.TAB_TO_GTS_ANIMATION + "<Study"})
@CommandLineFlags.Add({BASE_PARAMS + "/baseline_tab_suggestions/true" +
"/baseline_close_tab_suggestions/true/min_time_between_prefetches/0"})
"/baseline_close_tab_suggestions/true/min_time_between_prefetches/0/"
+ "thumbnail_aspect_ratio/1.0"})
@FlakyTest(message = "https://crbug.com/1198484")
public void testShowOnlyOneTabSuggestionMessageCard_withHardCleanup()
throws InterruptedException {
Expand All @@ -963,7 +964,8 @@ public void testShowOnlyOneTabSuggestionMessageCard_withHardCleanup()
@EnableFeatures({ChromeFeatureList.CLOSE_TAB_SUGGESTIONS + "<Study",
ChromeFeatureList.TAB_TO_GTS_ANIMATION + "<Study"})
@CommandLineFlags.Add({BASE_PARAMS + "/baseline_tab_suggestions/true" +
"/baseline_close_tab_suggestions/true/min_time_between_prefetches/0"})
"/baseline_close_tab_suggestions/true/min_time_between_prefetches/0/"
+ "thumbnail_aspect_ratio/1.0"})
public void testTabSuggestionMessageCardDismissAfterTabClosing() throws InterruptedException {
// clang-format on
prepareTabs(3, 0, mUrl);
Expand All @@ -973,7 +975,6 @@ public void testTabSuggestionMessageCardDismissAfterTabClosing() throws Interrup

enterGTSWithThumbnailChecking();
CriteriaHelper.pollUiThread(TabSwitcherCoordinator::hasAppendedMessagesForTesting);
onView(tabSwitcherViewMatcher()).perform(swipeUp());
onView(withId(R.id.tab_grid_message_item)).check(matches(isDisplayed()));

closeFirstTabInTabSwitcher();
Expand Down Expand Up @@ -1053,7 +1054,8 @@ public void testNewTabTile() throws InterruptedException {
@EnableFeatures({ChromeFeatureList.CLOSE_TAB_SUGGESTIONS + "<Study",
ChromeFeatureList.TAB_TO_GTS_ANIMATION + "<Study"})
@CommandLineFlags.Add({BASE_PARAMS + "/baseline_tab_suggestions/true" +
"/baseline_close_tab_suggestions/true/min_time_between_prefetches/0"})
"/baseline_close_tab_suggestions/true/min_time_between_prefetches/0/"
+ "thumbnail_aspect_ratio/1.0"})
public void testTabSuggestionMessageCard_orientation() throws InterruptedException {
// clang-format on
ChromeTabbedActivity cta = mActivityTestRule.getActivity();
Expand Down Expand Up @@ -1149,26 +1151,39 @@ public void testThumbnailAspectRatio_default() {
prepareTabs(2, 0, mUrl);
enterTabSwitcher(mActivityTestRule.getActivity());
onView(tabSwitcherViewMatcher())
.check(ThumbnailAspectRatioAssertion.havingAspectRatio(0.85));
.check(ThumbnailAspectRatioAssertion.havingAspectRatio(1.0));
}

@Test
@MediumTest
@EnableFeatures({ChromeFeatureList.TAB_TO_GTS_ANIMATION + "<Study"})
@CommandLineFlags.Add({BASE_PARAMS + "/thumbnail_aspect_ratio/0.75"})
@DisabledTest(message = "https://crbug.com/1122657")
public void testThumbnailAspectRatio_point75() {
prepareTabs(2, 0, mUrl);
enterTabSwitcher(mActivityTestRule.getActivity());
onView(tabSwitcherViewMatcher())
.check(ThumbnailAspectRatioAssertion.havingAspectRatio(0.75));
leaveGTSAndVerifyThumbnailsAreReleased();

Tab tab = mActivityTestRule.getActivity().getTabModelSelector().getCurrentTab();
mActivityTestRule.loadUrlInTab(
NTP_URL, PageTransition.TYPED | PageTransition.FROM_ADDRESS_BAR, tab);
enterTabSwitcher(mActivityTestRule.getActivity());
onView(tabSwitcherViewMatcher())
.check(ThumbnailAspectRatioAssertion.havingAspectRatio(0.85));
.check(ThumbnailAspectRatioAssertion.havingAspectRatio(0.75));
}

@Test
@MediumTest
@EnableFeatures({ChromeFeatureList.TAB_TO_GTS_ANIMATION + "<Study"})
@CommandLineFlags.Add({BASE_PARAMS + "allow_to_refetch/true"})
@CommandLineFlags.Add({BASE_PARAMS + "/thumbnail_aspect_ratio/2.0/allow_to_refetch/true"})
@DisabledTest(message = "Flaky - https://crbug.com/1124041")
public void testThumbnailAspectRatio_fromPoint85ToPoint75() throws Exception {
public void testThumbnailAspectRatio_fromTwoToPoint75() throws Exception {
prepareTabs(2, 0, mUrl);
enterTabSwitcher(mActivityTestRule.getActivity());
onView(tabSwitcherViewMatcher())
.check(ThumbnailAspectRatioAssertion.havingAspectRatio(0.85));
.check(ThumbnailAspectRatioAssertion.havingAspectRatio(2.0));
TabModel currentTabModel =
mActivityTestRule.getActivity().getTabModelSelector().getCurrentModel();
for (int i = 0; i < currentTabModel.getCount(); i++) {
Expand All @@ -1181,7 +1196,7 @@ public void testThumbnailAspectRatio_fromPoint85ToPoint75() throws Exception {

enterTabSwitcher(mActivityTestRule.getActivity());
onView(tabSwitcherViewMatcher())
.check(ThumbnailAspectRatioAssertion.havingAspectRatio(0.85));
.check(ThumbnailAspectRatioAssertion.havingAspectRatio(2.0));
TabUiTestHelper.finishActivity(mActivityTestRule.getActivity());
}

Expand Down Expand Up @@ -1265,7 +1280,7 @@ public void testThumbnailFetchingResult_defaultAspectRatio() throws Exception {
@Test
@MediumTest
@EnableFeatures({ChromeFeatureList.TAB_TO_GTS_ANIMATION + "<Study"})
@CommandLineFlags.Add({BASE_PARAMS + "allow_to_refetch/true"})
@CommandLineFlags.Add({BASE_PARAMS + "/thumbnail_aspect_ratio/2.0/allow_to_refetch/true"})
@DisabledTest(message = "http://crbug/1119527 - Flaky on bots.")
public void testThumbnailFetchingResult_changingAspectRatio() throws Exception {
prepareTabs(2, 0, mUrl);
Expand Down Expand Up @@ -1308,7 +1323,7 @@ public void testThumbnailFetchingResult_changingAspectRatio() throws Exception {
oldDifferentAspectRatioJpegCount = currentDifferentAspectRatioJpegCount;

onView(tabSwitcherViewMatcher())
.check(ThumbnailAspectRatioAssertion.havingAspectRatio(0.85));
.check(ThumbnailAspectRatioAssertion.havingAspectRatio(2.0));

TabModel currentTabModel =
mActivityTestRule.getActivity().getTabModelSelector().getCurrentModel();
Expand Down Expand Up @@ -1342,14 +1357,14 @@ public void testThumbnailFetchingResult_changingAspectRatio() throws Exception {
TabContentManager.ThumbnailFetchingResult.GOT_NOTHING)
- oldNothingCount);
onView(tabSwitcherViewMatcher())
.check(ThumbnailAspectRatioAssertion.havingAspectRatio(0.85));
.check(ThumbnailAspectRatioAssertion.havingAspectRatio(2.0));
}

@Test
@MediumTest
@EnableFeatures({ChromeFeatureList.TAB_TO_GTS_ANIMATION + "<Study"})
@CommandLineFlags.Add({BASE_PARAMS})
public void testRecycling() {
public void testRecycling_defaultAspectRatio() {
prepareTabs(10, 0, mUrl);
ChromeTabUtils.switchTabInCurrentTabModel(mActivityTestRule.getActivity(), 0);
enterTabSwitcher(mActivityTestRule.getActivity());
Expand All @@ -1360,8 +1375,21 @@ public void testRecycling() {
@MediumTest
// clang-format off
@EnableFeatures({ChromeFeatureList.TAB_TO_GTS_ANIMATION + "<Study"})
@CommandLineFlags.Add({BASE_PARAMS})
public void testExpandTab() {
@CommandLineFlags.Add({BASE_PARAMS + "/thumbnail_aspect_ratio/0.75"})
public void testRecycling_aspectRatioPoint75() {
// clang-format on
prepareTabs(10, 0, mUrl);
ChromeTabUtils.switchTabInCurrentTabModel(mActivityTestRule.getActivity(), 0);
enterTabSwitcher(mActivityTestRule.getActivity());
onView(tabSwitcherViewMatcher()).perform(RecyclerViewActions.scrollToPosition(9));
}

@Test
@MediumTest
// clang-format off
@EnableFeatures({ChromeFeatureList.TAB_TO_GTS_ANIMATION + "<Study"})
@CommandLineFlags.Add({BASE_PARAMS + "/thumbnail_aspect_ratio/0.75"})
public void testExpandTab_withAspectRatioPoint75() {
// clang-format on
prepareTabs(1, 0, mUrl);
enterTabSwitcher(mActivityTestRule.getActivity());
Expand All @@ -1374,9 +1402,9 @@ public void testExpandTab() {
// clang-format off
@EnableFeatures({ChromeFeatureList.TAB_GROUPS_ANDROID,
ChromeFeatureList.TAB_TO_GTS_ANIMATION + "<Study"})
@CommandLineFlags.Add({BASE_PARAMS})
@CommandLineFlags.Add({BASE_PARAMS + "/thumbnail_aspect_ratio/1.0"})
@DisabledTest(message = "https://crbug.com/1205952")
public void testRenderGrid() throws IOException {
public void testRenderGrid_withAspectRatioOfOne() throws IOException {
// clang-format on
ChromeTabbedActivity cta = mActivityTestRule.getActivity();
prepareTabs(3, 0, "about:blank");
Expand Down Expand Up @@ -1871,7 +1899,8 @@ public void testTabGroupManualSelection_SystemBackDismiss() {
ChromeFeatureList.CLOSE_TAB_SUGGESTIONS + "<Study"})
@DisableFeatures(ChromeFeatureList.TAB_TO_GTS_ANIMATION)
@CommandLineFlags.Add({BASE_PARAMS + "/baseline_tab_suggestions/true" +
"/baseline_close_tab_suggestions/true/min_time_between_prefetches/0"})
"/baseline_close_tab_suggestions/true/min_time_between_prefetches/0" +
"/thumbnail_aspect_ratio/1.0"})
public void testTabGroupManualSelection_AfterReviewTabSuggestion() throws InterruptedException {
// clang-format on
ChromeTabbedActivity cta = mActivityTestRule.getActivity();
Expand All @@ -1889,7 +1918,6 @@ public void testTabGroupManualSelection_AfterReviewTabSuggestion() throws Interr
// thumbnail checking here is to ensure the suggestion is valid when entering tab switcher.
enterGTSWithThumbnailChecking();
CriteriaHelper.pollUiThread(TabSwitcherCoordinator::hasAppendedMessagesForTesting);
onView(tabSwitcherViewMatcher()).perform(swipeUp());
onView(withId(R.id.tab_grid_message_item)).check(matches(isDisplayed()));
onView(allOf(withId(R.id.action_button), withParent(withId(R.id.tab_grid_message_item))))
.perform(click());
Expand Down

0 comments on commit 1c32a70

Please sign in to comment.