Index: chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationUIManagerTest.java |
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationUIManagerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationUIManagerTest.java |
index 1c77f6944005a64616af58ab62b817f631d80213..13787333248b40e6906112fdcb27933d946b723e 100644 |
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationUIManagerTest.java |
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationUIManagerTest.java |
@@ -86,6 +86,23 @@ public class NotificationUIManagerTest extends NotificationTestBase { |
*/ |
@MediumTest |
@Feature({"Browser", "Notifications"}) |
+ public void testNotificationRenotifyProperty() throws Exception { |
+ loadUrl(NOTIFICATION_TEST_PAGE); |
+ setNotificationContentSettingForCurrentOrigin(ContentSetting.ALLOW); |
+ |
+ Notification notification = |
+ showAndGetNotification("MyNotification", "{ tag: 'myTag', renotify: true }"); |
+ |
+ // Zero indicates that no defaults should be inherited from the system. |
+ assertEquals(0, notification.flags & Notification.FLAG_ONLY_ALERT_ONCE); |
+ } |
+ |
+ /** |
+ * Verifies that notifications created with the "silent" flag do not inherit system defaults |
+ * in regards to their sound, vibration and light indicators. |
+ */ |
+ @MediumTest |
+ @Feature({"Browser", "Notifications"}) |
public void testNotificationSilentProperty() throws Exception { |
loadUrl(NOTIFICATION_TEST_PAGE); |
setNotificationContentSettingForCurrentOrigin(ContentSetting.ALLOW); |