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

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

Issue 1417913002: Notifications: Improve SW notification property layout test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed review nits Created 5 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/notifications/serviceworker-notification-properties.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
11 // semantics defined by the specification. When the test is being ran 11 // semantics defined by the specification. When the test is being ran
12 // manually, grant Notification permission first. 12 // manually, grant Notification permission first.
13 test(function () { 13 test(function () {
14 assert_greater_than_equal(Notification.maxActions, 0); 14 assert_greater_than_equal(Notification.maxActions, 0);
15 var oldMaxActions = Notification.maxActions;
16 Notification.maxActions++;
17 assert_equals(Notification.maxActions, oldMaxActions, 'Notification.ma xActions should be immutable.');
15 18
16 var options = { 19 var options = {
17 dir: "rtl", 20 dir: "rtl",
18 lang: "nl-NL", 21 lang: "nl-NL",
19 body: "Hallo, wereld!", 22 body: "Hallo, wereld!",
20 tag: "notification", 23 tag: "notification",
21 icon: "http://localhost/my_icon.png", 24 icon: "http://localhost/my_icon.png",
22 silent: true, 25 silent: true,
23 requireInteraction: true, 26 requireInteraction: true,
24 data: "my data", 27 data: "my data",
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // Invalid vibrate pattern should be reset to 0. 120 // Invalid vibrate pattern should be reset to 0.
118 var invalidVibrateNotification = new Notification("My Notification", { 121 var invalidVibrateNotification = new Notification("My Notification", {
119 vibrate: [100, 200, "invalid"] 122 vibrate: [100, 200, "invalid"]
120 }); 123 });
121 assert_array_equals(invalidVibrateNotification.vibrate, [100, 200, 0 ]); 124 assert_array_equals(invalidVibrateNotification.vibrate, [100, 200, 0 ]);
122 125
123 }, 'Checks the properties exposed on the Notification object.'); 126 }, 'Checks the properties exposed on the Notification object.');
124 </script> 127 </script>
125 </body> 128 </body>
126 </html> 129 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/notifications/serviceworker-notification-properties.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698