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

Unified Diff: Source/modules/notifications/NotificationDataTest.cpp

Issue 1309273007: Add requireInteraction to Notification & NotificationOptions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@constructor
Patch Set: Add to NotificationDataTest.cpp Created 5 years, 4 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: Source/modules/notifications/NotificationDataTest.cpp
diff --git a/Source/modules/notifications/NotificationDataTest.cpp b/Source/modules/notifications/NotificationDataTest.cpp
index 9c6de2c00e984b0bd3d1c447abcbfa62fb5c92d4..39b1916cb1e864b9bcfd8d69710d99ab68b2cdf2 100644
--- a/Source/modules/notifications/NotificationDataTest.cpp
+++ b/Source/modules/notifications/NotificationDataTest.cpp
@@ -26,6 +26,7 @@ const char kNotificationTag[] = "my_tag";
const char kNotificationIcon[] = "https://example.com/icon.png";
const unsigned kNotificationVibration[] = { 42, 10, 20, 30, 40 };
const bool kNotificationSilent = false;
+const bool kNotificationRequireInteraction = true;
const char kNotificationActionAction[] = "my_action";
const char kNotificationActionTitle[] = "My Action";
@@ -72,6 +73,7 @@ TEST_F(NotificationDataTest, ReflectProperties)
options.setIcon(kNotificationIcon);
options.setVibrate(vibrationSequence);
options.setSilent(kNotificationSilent);
+ options.setRequireInteraction(kNotificationRequireInteraction);
options.setActions(actions);
// TODO(peter): Test |options.data| and |notificationData.data|.
@@ -94,6 +96,7 @@ TEST_F(NotificationDataTest, ReflectProperties)
EXPECT_EQ(vibrationPattern[i], static_cast<unsigned>(notificationData.vibrate[i]));
EXPECT_EQ(kNotificationSilent, notificationData.silent);
+ EXPECT_EQ(kNotificationRequireInteraction, notificationData.requireInteraction);
EXPECT_EQ(actions.size(), notificationData.actions.size());
}
« no previous file with comments | « Source/modules/notifications/NotificationData.cpp ('k') | Source/modules/notifications/NotificationOptions.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698