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

Side by Side Diff: LayoutTests/http/tests/notifications/notification-properties.html

Issue 1042513002: Add the vibrate attribute to the Notification object (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Notifications: The Notification object exposes the expected propertie s.</title> 4 <title>Notifications: The Notification object exposes the expected propertie s.</title>
5 <script src="../resources/testharness.js"></script> 5 <script src="../resources/testharness.js"></script>
6 <script src="../resources/testharnessreport.js"></script> 6 <script src="../resources/testharnessreport.js"></script>
7 </head> 7 </head>
8 <body> 8 <body>
9 <script> 9 <script>
10 // Tests that the Notification object exposes the properties per the 10 // Tests that the Notification object exposes the properties per the
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 // Icon URLs should be returned in serialized form. 60 // Icon URLs should be returned in serialized form.
61 assert_equals(serializedUrlNotification.icon, "http://example.com/") ; 61 assert_equals(serializedUrlNotification.icon, "http://example.com/") ;
62 62
63 var noTagNotification = new Notification("My Notification"), 63 var noTagNotification = new Notification("My Notification"),
64 emptyTagNotification = new Notification("My Notification", { tag : "" }); 64 emptyTagNotification = new Notification("My Notification", { tag : "" });
65 65
66 // Setting an empty string as the tag should be equal to not setting the tag at all. 66 // Setting an empty string as the tag should be equal to not setting the tag at all.
67 assert_equals(noTagNotification.tag, emptyTagNotification.tag); 67 assert_equals(noTagNotification.tag, emptyTagNotification.tag);
68 68
69 // Tests that sequence<unsigned long> input no throws exceptions.
Peter Beverloo 2015/04/01 14:26:29 sequence<unsigned long> doesn't mean anything to J
Sanghyun Park 2015/04/01 17:46:08 I'll fix this.
70 var vibrateNotification = new Notification("My Notification", {
71 vibrate: [100, 2000, 1000]
72 });
73
74 // Verifying the exception throwing behavior, when slient set true a nd vibrate is presented.
Peter Beverloo 2015/04/01 14:26:29 Could you add a test for ServiceWorkerRegistration
Sanghyun Park 2015/04/01 17:46:08 Okay I'll add test of ServiceWorkerRegistration.sh
75 assert_throws(new TypeError(), function() {
76 var notification = new Notification('Title', {
Peter Beverloo 2015/04/01 14:26:29 nit: Please be consistent with ' vs. " for definin
Sanghyun Park 2015/04/01 17:46:08 Done.
77 silent: true,
78 vibrate: 1000
79 });
80 }, 'Set vibrate, when slient is true.');
81
69 }, 'Checks the properties exposed on the Notification object.'); 82 }, 'Checks the properties exposed on the Notification object.');
70 </script> 83 </script>
71 </body> 84 </body>
72 </html> 85 </html>
OLDNEW
« no previous file with comments | « no previous file | Source/modules/notifications/DEPS » ('j') | Source/modules/notifications/Notification.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698