Skip to content

Commit

Permalink
Add some components to render tests
Browse files Browse the repository at this point in the history
Adds bug components to a handful of render tests to be uploaded in the
debug information sent to Gold.

Bug: 1304942
Change-Id: Ia161ba1aed143d6185e9a11ef965b1c78c5e7274
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3537736
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Auto-Submit: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: Theresa Sullivan <twellington@chromium.org>
Commit-Queue: Theresa Sullivan <twellington@chromium.org>
Cr-Commit-Position: refs/heads/main@{#982990}
  • Loading branch information
Brian Sheedy authored and Chromium LUCI CQ committed Mar 19, 2022
1 parent 293a8b6 commit 0f0d4be
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 7 deletions.
Expand Up @@ -113,7 +113,10 @@ public class InstantStartTabSwitcherTest {

@Rule
public ChromeRenderTestRule mRenderTestRule =
ChromeRenderTestRule.Builder.withPublicCorpus().setRevision(1).build();
ChromeRenderTestRule.Builder.withPublicCorpus()
.setRevision(1)
.setBugComponent(ChromeRenderTestRule.Component.UI_BROWSER_MOBILE_START)
.build();

/**
* {@link ParameterProvider} used for parameterized test that provides whether it's single tab
Expand Down
Expand Up @@ -117,7 +117,10 @@ public class InstantStartTest {

@Rule
public ChromeRenderTestRule mRenderTestRule =
ChromeRenderTestRule.Builder.withPublicCorpus().setRevision(1).build();
ChromeRenderTestRule.Builder.withPublicCorpus()
.setRevision(1)
.setBugComponent(ChromeRenderTestRule.Component.UI_BROWSER_MOBILE_START)
.build();

@Rule
public ErrorCollector collector = new ErrorCollector();
Expand Down
Expand Up @@ -74,7 +74,10 @@ public class InstantStartToolbarTest {

@Rule
public ChromeRenderTestRule mRenderTestRule =
ChromeRenderTestRule.Builder.withPublicCorpus().setRevision(1).build();
ChromeRenderTestRule.Builder.withPublicCorpus()
.setRevision(1)
.setBugComponent(ChromeRenderTestRule.Component.UI_BROWSER_MOBILE_START)
.build();

@After
public void tearDown() {
Expand Down
Expand Up @@ -186,7 +186,10 @@ public class StartSurfaceLayoutTest {

@Rule
public ChromeRenderTestRule mRenderTestRule =
ChromeRenderTestRule.Builder.withPublicCorpus().setRevision(1).build();
ChromeRenderTestRule.Builder.withPublicCorpus()
.setRevision(1)
.setBugComponent(ChromeRenderTestRule.Component.UI_BROWSER_MOBILE_START)
.build();

@SuppressWarnings("FieldCanBeLocal")
private EmbeddedTestServer mTestServer;
Expand Down
Expand Up @@ -52,7 +52,9 @@ public class ContextMenuRenderTest extends BlankUiTestActivityTestCase {

@Rule
public ChromeRenderTestRule mRenderTestRule =
ChromeRenderTestRule.Builder.withPublicCorpus().build();
ChromeRenderTestRule.Builder.withPublicCorpus()
.setBugComponent(ChromeRenderTestRule.Component.UI_BROWSER_MOBILE_CONTEXT_MENU)
.build();

private ModelListAdapter mAdapter;
private ModelList mListItems;
Expand Down
Expand Up @@ -105,6 +105,7 @@ public class TosAndUmaFirstRunFragmentWithEnterpriseSupportTest {
ChromeRenderTestRule.Builder.withPublicCorpus()
.setRevision(RENDER_TEST_REVISION)
.setDescription(RENDER_TEST_REVISION_DESCRIPTION)
.setBugComponent(ChromeRenderTestRule.Component.UI_BROWSER_FIRST_RUN)
.build();
@Rule
public final AccountManagerTestRule mAccountManagerTestRule = new AccountManagerTestRule();
Expand Down
Expand Up @@ -62,7 +62,9 @@ public class AppMenuItemViewBinderRenderTest {
new BaseActivityTestRule<>(BlankUiTestActivity.class);
@Rule
public ChromeRenderTestRule mRenderTestRule =
ChromeRenderTestRule.Builder.withPublicCorpus().build();
ChromeRenderTestRule.Builder.withPublicCorpus()
.setBugComponent(ChromeRenderTestRule.Component.UI_BROWSER_MOBILE_APP_MENU)
.build();
private static Activity sActivity;
private static ListView sListView;
private static View sContentView;
Expand Down
Expand Up @@ -48,7 +48,10 @@ public class MessageBannerRenderTest extends BlankUiTestActivityTestCase {
new NightModeTestUtils.NightModeParams().getParameters();

@Rule
public RenderTestRule mRenderTestRule = RenderTestRule.Builder.withPublicCorpus().build();
public RenderTestRule mRenderTestRule =
RenderTestRule.Builder.withPublicCorpus()
.setBugComponent(RenderTestRule.Component.UI_BROWSER_MOBILE_MESSAGES)
.build();

public MessageBannerRenderTest(boolean nightModeEnabled) {
NightModeTestUtils.setUpNightModeForBlankUiTestActivity(nightModeEnabled);
Expand Down
Expand Up @@ -124,6 +124,11 @@ public class RenderTestRule extends TestWatcher {
// Default for now, likely to be removed once all existing uses have a valid component.
String NONE = "N/A";
String BLINK_FORMS_COLOR = "Blink>Forms>Color";
String UI_BROWSER_FIRST_RUN = "UI>Browser>FirstRun";
String UI_BROWSER_MOBILE_APP_MENU = "UI>Browser>Mobile>AppMenu";
String UI_BROWSER_MOBILE_CONTEXT_MENU = "UI>Browser>Mobile>ContextMenu";
String UI_BROWSER_MOBILE_MESSAGES = "UI>Browser>Mobile>Messages";
String UI_BROWSER_MOBILE_START = "UI>Browser>Mobile>Start";
}

// Skia Gold-specific constructor used by the builder.
Expand Down

0 comments on commit 0f0d4be

Please sign in to comment.