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

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

Issue 2316263002: Notifications in sensitive contexts now display origin + small icon (Closed)
Patch Set: Notifications in sensitive contexts now display origin + small icon Created 4 years, 3 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
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..3f6562a5b8a50dd60b2be3fdc71952221faa06af 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
@@ -101,6 +101,14 @@ 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("origin", Build.VERSION.SDK_INT <= Build.VERSION_CODES.M
+ ? NotificationTestUtil.getExtraTitle(notification.publicVersion)
+ : NotificationTestUtil.getExtraSubText(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);

Powered by Google App Engine
This is Rietveld 408576698