Commit ddccab28 authored by Wenyu Fu's avatar Wenyu Fu Committed by Commit Bot

Add test prefix for logo drawable in PromoCard tests

Bug: 1068831
Change-Id: I6d6aefb0b6e2f787d40da742ab4214eee9695812
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2159316
Commit-Queue: Wenyu Fu <wenyufu@chromium.org>
Commit-Queue: Theresa  <twellington@chromium.org>
Auto-Submit: Wenyu Fu <wenyufu@chromium.org>
Reviewed-by: default avatarTheresa  <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#761098}
parent 77b8af8e
......@@ -253,8 +253,8 @@ android_resources("java_test_resources") {
"test/java/res/drawable-xhdpi/promo_dialog_test_drawable.png",
"test/java/res/drawable-xxhdpi/promo_dialog_test_drawable.png",
"test/java/res/drawable-xxxhdpi/promo_dialog_test_drawable.png",
"test/java/res/drawable/logo_avatar_anonymous.xml",
"test/java/res/drawable/promo_dialog_test_vector.xml",
"test/java/res/drawable/test_logo_avatar_anonymous.xml",
"test/java/res/layout/dual_control_test_layout.xml",
"test/java/res/layout/radio_button_render_test.xml",
"test/java/res/layout/radio_button_with_description_layout_test.xml",
......
......@@ -48,7 +48,7 @@ public class PromoCardCoordinatorTest {
public void
testTextImageBinding() {
final Drawable testImage =
AppCompatResources.getDrawable(mContext, R.drawable.logo_avatar_anonymous);
AppCompatResources.getDrawable(mContext, R.drawable.test_logo_avatar_anonymous);
final String titleString = "Some string for title";
final String testString = "Some test string";
final String primaryButtonString = "Primary button string";
......
......@@ -59,14 +59,14 @@ public class PromoCardViewRenderTest extends DummyUiActivityTestCase {
public void setUpTest() throws Exception {
super.setUpTest();
Activity activity = getActivity();
mModel =
new PropertyModel.Builder(PromoCardProperties.ALL_KEYS)
.with(PromoCardProperties.IMAGE, activity, R.drawable.logo_avatar_anonymous)
.with(PromoCardProperties.TITLE, "Title for Promo Card.")
.with(PromoCardProperties.DESCRIPTION, "Description for Promo Card.")
.with(PromoCardProperties.PRIMARY_BUTTON_TEXT, "Primary button")
.with(PromoCardProperties.SECONDARY_BUTTON_TEXT, "Secondary button")
.build();
mModel = new PropertyModel.Builder(PromoCardProperties.ALL_KEYS)
.with(PromoCardProperties.IMAGE, activity,
R.drawable.test_logo_avatar_anonymous)
.with(PromoCardProperties.TITLE, "Title for Promo Card.")
.with(PromoCardProperties.DESCRIPTION, "Description for Promo Card.")
.with(PromoCardProperties.PRIMARY_BUTTON_TEXT, "Primary button")
.with(PromoCardProperties.SECONDARY_BUTTON_TEXT, "Secondary button")
.build();
mPromoCardCoordinator = new PromoCardCoordinator(activity, mModel, "render-test");
TestThreadUtils.runOnUiThreadBlocking(() -> {
......
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