Commit da52dd9c authored by Tanmoy Mollik's avatar Tanmoy Mollik Committed by Commit Bot

Reland "[Android] Add render test for sync promo in MainSettings"

The test failed because of 4 pixel mismatches on the corners of the
rendered images. To the naked eye they look identical. Enabling the
test as it might be golden render issue.

This is a reland of 7201dc96

Original change's description:
> [Android] Add render test for sync promo in MainSettings
>
> This cl adds a render test to check that sync promo is shown when the
> user has signed in with without sync consent.
>
> Bug: 1105800
> Change-Id: I24bb2a78f84ebf39586fbe285bc7361ecba30cc1
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2467878
> Reviewed-by: Marc Treib <treib@chromium.org>
> Commit-Queue: Tanmoy Mollik <triploblastic@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#817018}

Bug: 1105800
Change-Id: Iacdd454607f1f755c38f25531dd9a8bc8fd0dd51
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2484431Reviewed-by: default avatarTanmoy Mollik <triploblastic@chromium.org>
Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Commit-Queue: Tanmoy Mollik <triploblastic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#819811}
parent f8b7ec28
......@@ -417,6 +417,20 @@ public class MainSettingsFragmentTest {
mMainSettings.findPreference(MainSettings.PREF_MANAGE_SYNC).isVisible());
}
@Test
@LargeTest
@Feature({"RenderTest"})
@Features.EnableFeatures({ChromeFeatureList.MOBILE_IDENTITY_CONSISTENCY})
public void testSyncPromoView() throws Exception {
mSyncTestRule.setUpAccountAndSignInForTesting();
launchSettingsActivity();
Preference syncPromoPreference = mMainSettings.findPreference(MainSettings.PREF_SYNC_PROMO);
CriteriaHelper.pollUiThread(() -> syncPromoPreference.isVisible());
View syncPromoView = mMainSettings.getView().findViewById(R.id.signin_promo_view_container);
mRenderTestRule.render(syncPromoView, "main_settings_sync_promo");
}
@Test
@SmallTest
public void testRemoveSettings() {
......
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