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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/notifications/notification-properties.html

Issue 1855443002: Implement receiving side of web notification inline replies (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added test and removed unnecessary code. Created 4 years, 8 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: third_party/WebKit/LayoutTests/http/tests/notifications/notification-properties.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/notifications/notification-properties.html b/third_party/WebKit/LayoutTests/http/tests/notifications/notification-properties.html
index 2318ef1aed2b0a4469999ac50210980d41b69407..2550ab27fdf25fca3ba0fa90ae19ef6cd5a94c3b 100644
--- a/third_party/WebKit/LayoutTests/http/tests/notifications/notification-properties.html
+++ b/third_party/WebKit/LayoutTests/http/tests/notifications/notification-properties.html
@@ -116,6 +116,20 @@
});
}, 'Providing non-empty `actions` for a non-persistent notification should throw a TypeError.');
+ // Notification actions should only support the placeholder attribute if they are type text.
+ assert_throws(new TypeError(), function() {
+ new Notification("My Notification", {
+ actions: [{ action: "foo", title: "Foo", placeholder: "I'm sorry, Dave." }]
+ });
+ }, 'Providing a placeholder for an action that is not type text should throw a TypeError.');
+
+ // Notification actions should not accept invalid types.
+ assert_throws(new TypeError(), function() {
+ new Notification("My Notification", {
+ actions: [{ type: "blah", action: "foo", title: "Foo" }]
+ });
+ }, 'Providing an invalid type for an action should throw a TypeError.');
+
}, 'Checks the properties exposed on the Notification object.');
</script>
</body>

Powered by Google App Engine
This is Rietveld 408576698