Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6420)

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/notifications/CustomNotificationBuilderTest.java

Issue 1569783005: Notification custom layouts: move settings button to the footer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/notifications/StandardNotificationBuilder.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0c13bd129d091710316037981ab90b337bc3ae14..d6d38d748e04f3aac1abb2703c2a100f87f8288a 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
@@ -58,6 +58,8 @@ public void testSetAll() {
createIntent(context, "ActionButtonOne"))
.addAction(0 /* iconId */, "button",
createIntent(context, "ActionButtonTwo"))
+ .addSettingsAction(0 /* iconId */, "settings",
+ createIntent(context, "SettingsButton"))
.build();
View compactView = notification.contentView.apply(context, new LinearLayout(context));
View bigView = notification.bigContentView.apply(context, new LinearLayout(context));
@@ -79,7 +81,9 @@ public void testSetAll() {
assertSame(contentIntent, notification.contentIntent);
assertSame(deleteIntent, notification.deleteIntent);
- assertEquals(2, notification.actions.length);
+ // The regular actions and the settings action are added together in the notification
+ // actions array, so they can be exposed on e.g. Wear and custom lockscreens.
+ assertEquals(3, notification.actions.length);
ArrayList<View> buttons = new ArrayList<>();
bigView.findViewsWithText(buttons, "button", View.FIND_VIEWS_WITH_TEXT);
assertEquals(2, buttons.size());
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/notifications/StandardNotificationBuilder.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698