Chromium Code Reviews| Index: chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationPlatformBridgeTest.java |
| diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationPlatformBridgeTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationPlatformBridgeTest.java |
| index c450cafdf41f7fb622e6779158d20e918c627b48..ae93a0438e0dc11600a18e856dc249f101a4e077 100644 |
| --- a/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationPlatformBridgeTest.java |
| +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationPlatformBridgeTest.java |
| @@ -18,6 +18,7 @@ import android.test.suitebuilder.annotation.MediumTest; |
| import org.chromium.base.ThreadUtils; |
| import org.chromium.base.annotations.SuppressFBWarnings; |
| +import org.chromium.base.test.util.CommandLineFlags; |
| import org.chromium.base.test.util.Feature; |
| import org.chromium.base.test.util.RetryOnFailure; |
| import org.chromium.chrome.R; |
| @@ -213,6 +214,27 @@ public class NotificationPlatformBridgeTest extends NotificationTestBase { |
| /** |
| * Verifies that the ONLY_ALERT_ONCE flag is not set when renotify is true. |
|
awdf
2016/09/13 14:14:54
oops, copy-pasted this comment by accident
|
| */ |
| + @CommandLineFlags.Add("enable-experimental-web-platform-features") |
| + @MediumTest |
| + @Feature({"Browser", "Notifications"}) |
| + public void testNotificationInlineReply() throws Exception { |
| + loadUrl(getTestServer().getURL(NOTIFICATION_TEST_PAGE)); |
| + setNotificationContentSettingForCurrentOrigin(ContentSetting.ALLOW); |
| + |
| + Notification notification = showAndGetNotification("MyNotification", "{ " |
| + + " actions: [{action: 'myAction', title: 'reply', type: 'text'," |
| + + " placeholder: 'hi' }]}"); |
| + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT_WATCH) { |
| + assertNotNull(notification.actions); |
| + assertEquals(2, notification.actions.length); |
| + Notification.Action action = notification.actions[0]; |
| + assertNotNull(action.getRemoteInputs()); |
| + } |
| + } |
| + |
| + /** |
| + * Verifies that the ONLY_ALERT_ONCE flag is not set when renotify is true. |
| + */ |
| @MediumTest |
| @Feature({"Browser", "Notifications"}) |
| public void testNotificationRenotifyProperty() throws Exception { |