Commit ffbc1dcd authored by Angel Alvarez's avatar Angel Alvarez Committed by Commit Bot

Adds render tests for Explore Sites Dense Views

Bug: 977713
Change-Id: I54b01d443cf8f4335569e9f741a648bfc3c5cff1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1769720Reviewed-by: default avatarJustin DeWitt <dewittj@chromium.org>
Reviewed-by: default avatarCathy Li <chili@chromium.org>
Commit-Queue: Angel Alvarez <angelii@google.com>
Cr-Commit-Position: refs/heads/master@{#691753}
parent be95a711
...@@ -181,30 +181,28 @@ public class ExploreSitesPageTest { ...@@ -181,30 +181,28 @@ public class ExploreSitesPageTest {
@SmallTest @SmallTest
@CommandLineFlags. @CommandLineFlags.
Add({"enable-features=ExploreSites<FakeStudyName", "force-fieldtrials=FakeStudyName/Enabled", Add({"enable-features=ExploreSites<FakeStudyName", "force-fieldtrials=FakeStudyName/Enabled",
"force-fieldtrial-params=FakeStudyName.Enabled:variation/mostLikelyTile" "force-fieldtrial-params=FakeStudyName.Enabled:variation/mostLikelyTile/denseVariation/"
+ "/denseVariation/titleBottom"}) + "titleBottom"})
@Feature({"ExploreSites"}) @Feature({"ExploreSites", "RenderTest"})
public void @ParameterAnnotations.UseMethodParameter(NightModeTestUtils.NightModeParams.class)
testInitialLayout_DenseTitleBottom() throws Exception { public void testInitialLayout_DenseTitleBottom(boolean nightModeEnabled) throws Exception {
// Ensure that the DenseTitleBottomView has loaded without crashing
Assert.assertEquals( Assert.assertEquals(
DenseVariation.DENSE_TITLE_BOTTOM, ExploreSitesBridge.getDenseVariation()); DenseVariation.DENSE_TITLE_BOTTOM, ExploreSitesBridge.getDenseVariation());
// TODO(angelii): Add render test once layout is finalized. mRenderTestRule.render(mRecyclerView, "initial_layout_dense_title_bottom");
} }
@Test @Test
@SmallTest @SmallTest
@CommandLineFlags. @CommandLineFlags.
Add({"enable-features=ExploreSites<FakeStudyName", "force-fieldtrials=FakeStudyName/Enabled", Add({"enable-features=ExploreSites<FakeStudyName", "force-fieldtrials=FakeStudyName/Enabled",
"force-fieldtrial-params=FakeStudyName.Enabled:variation/mostLikelyTile" "force-fieldtrial-params=FakeStudyName.Enabled:variation/mostLikelyTile/denseVariation/"
+ "/denseVariation/titleRight"}) + "titleRight"})
@Feature({"ExploreSites"}) @Feature({"ExploreSites", "RenderTest"})
public void @ParameterAnnotations.UseMethodParameter(NightModeTestUtils.NightModeParams.class)
testInitialLayout_DenseTitleRight() throws Exception { public void testInitialLayout_DenseTitleRight(boolean nightModeEnabled) throws Exception {
// Ensure that the DenseTitleRightView has loaded without crashing
Assert.assertEquals( Assert.assertEquals(
DenseVariation.DENSE_TITLE_RIGHT, ExploreSitesBridge.getDenseVariation()); DenseVariation.DENSE_TITLE_RIGHT, ExploreSitesBridge.getDenseVariation());
// TODO(angelii): Add render test once layout is finalized. mRenderTestRule.render(mRecyclerView, "initial_layout_dense_title_right");
} }
@Test @Test
......
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