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

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

Issue 2337963003: Plumb through notification action types and placeholders on Android (Closed)
Patch Set: 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/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 {

Powered by Google App Engine
This is Rietveld 408576698