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 ca67eeacb831a8c93e0f4a93109d070455d14071..b22886ff1e9d8fb2559f0e4c1f02f09ef66e0f83 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 |
@@ -74,6 +74,9 @@ public class CustomNotificationBuilderTest extends NativeLibraryTestBase { |
.addAction(actionIcon, "button", createIntent(context, "ActionButtonTwo")) |
.addSettingsAction( |
0 /* iconId */, "settings", createIntent(context, "SettingsButton")) |
+ .setPublicVersion(new CustomNotificationBuilder(context) |
Peter Beverloo
2016/09/09 12:53:31
Mm. This reads a bit odd since we don't use a cust
awdf
2016/09/09 15:55:26
Oops that was just leftover from before I switched
|
+ .setTitle("public title") |
+ .build()) |
.build(); |
View compactView = notification.contentView.apply(context, new LinearLayout(context)); |
View bigView = notification.bigContentView.apply(context, new LinearLayout(context)); |
@@ -101,6 +104,13 @@ public class CustomNotificationBuilderTest extends NativeLibraryTestBase { |
assertSame(contentIntent, notification.contentIntent); |
assertSame(deleteIntent, notification.deleteIntent); |
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { |
+ // Notification.publicVersion was added in Android L. |
+ assertNotNull(notification.publicVersion); |
+ assertEquals( |
+ "public title", NotificationTestUtil.getExtraTitle(notification.publicVersion)); |
+ } |
+ |
// 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, NotificationTestUtil.getActions(notification).length); |