| Index: chrome/android/javatests/src/org/chromium/chrome/browser/notifications/CustomNotificationBuilderTest.java
|
| diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/CustomNotificationBuilderTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/CustomNotificationBuilderTest.java
|
| index e6b8ee6b07bb47e2d25229fb28624cd31b155218..15e82a086d4f57b136c185b32a0f0f0f33db7d43 100644
|
| --- a/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/CustomNotificationBuilderTest.java
|
| +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/CustomNotificationBuilderTest.java
|
| @@ -43,6 +43,9 @@ public void testSetAll() {
|
| Bitmap largeIcon = Bitmap.createBitmap(
|
| new int[] {Color.RED}, 1 /* width */, 1 /* height */, Bitmap.Config.ARGB_8888);
|
|
|
| + Bitmap actionIcon = Bitmap.createBitmap(
|
| + new int[] {Color.WHITE}, 1 /* width */, 1 /* height */, Bitmap.Config.ARGB_8888);
|
| +
|
| Notification notification = new CustomNotificationBuilder(context)
|
| .setSmallIcon(R.drawable.ic_chrome)
|
| .setLargeIcon(largeIcon)
|
| @@ -56,7 +59,7 @@ public void testSetAll() {
|
| .setDeleteIntent(deleteIntent)
|
| .addAction(0 /* iconId */, "button",
|
| createIntent(context, "ActionButtonOne"))
|
| - .addAction(0 /* iconId */, "button",
|
| + .addAction(actionIcon, "button",
|
| createIntent(context, "ActionButtonTwo"))
|
| .addSettingsAction(0 /* iconId */, "settings",
|
| createIntent(context, "SettingsButton"))
|
| @@ -114,21 +117,19 @@ public void testMaxActionButtons() {
|
| .addAction(0 /* iconId */, "button",
|
| createIntent(context, "ActionButtonOne"))
|
| .addAction(0 /* iconId */, "button",
|
| - createIntent(context, "ActionButtonTwo"))
|
| - .addAction(0 /* iconId */, "button",
|
| - createIntent(context, "ActionButtonThree"));
|
| + createIntent(context, "ActionButtonTwo"));
|
| try {
|
| - builder.addAction(0 /* iconId */, "button", createIntent(context, "ActionButtonFour"));
|
| + builder.addAction(0 /* iconId */, "button", createIntent(context, "ActionButtonThree"));
|
| fail("This statement should not be reached as the previous statement should throw.");
|
| } catch (IllegalStateException e) {
|
| - assertEquals("Cannot add more than 3 actions.", e.getMessage());
|
| + assertEquals("Cannot add more than 2 actions.", e.getMessage());
|
| }
|
| Notification notification = builder.build();
|
| View bigView = notification.bigContentView.apply(context, new LinearLayout(context));
|
| ArrayList<View> buttons = new ArrayList<>();
|
| bigView.findViewsWithText(buttons, "button", View.FIND_VIEWS_WITH_TEXT);
|
|
|
| - assertEquals("There is a maximum of 3 buttons", 3, buttons.size());
|
| + assertEquals("There is a maximum of 2 buttons", 2, buttons.size());
|
| }
|
|
|
| @SmallTest
|
|
|