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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/notifications/serviceworker-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 unified diff | Download patch
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Notifications: Property reflection in the "notificationclick" event a nd SWR.getNotifications().</title> 4 <title>Notifications: Property reflection in the "notificationclick" event a nd SWR.getNotifications().</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 <script src="../serviceworker/resources/test-helpers.js"></script> 7 <script src="../serviceworker/resources/test-helpers.js"></script>
8 <script src="resources/test-helpers.js"></script> 8 <script src="resources/test-helpers.js"></script>
9 </head> 9 </head>
10 <body> 10 <body>
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 { property: 'foobar', 47 { property: 'foobar',
48 string: '\uDFFF\u0000\uDBFF', 48 string: '\uDFFF\u0000\uDBFF',
49 scalar: true }, 49 scalar: true },
50 12.15 50 12.15
51 ], 51 ],
52 actions: [] 52 actions: []
53 }; 53 };
54 // Deliberately add more actions than are supported. 54 // Deliberately add more actions than are supported.
55 for (var i = 0; i < 2 * Notification.maxActions; i++) { 55 for (var i = 0; i < 2 * Notification.maxActions; i++) {
56 options.actions.push({ 56 options.actions.push({
57 type: i % 2 == 0 ? 'button' : 'text',
57 action: 'a' + i, 58 action: 'a' + i,
58 title: 'Action ' + i, 59 title: 'Action ' + i,
59 icon: 'https://example/action_icon_' + i + '.png' 60 icon: 'https://example/action_icon_' + i + '.png',
61 placeholder: i % 2 == 0 ? null : 'Type a reply...'
60 }); 62 });
61 } 63 }
62 64
63 if (window.testRunner) { 65 if (window.testRunner) {
64 testRunner.setPermission('notifications', 'granted', location.orig in, location.origin); 66 testRunner.setPermission('notifications', 'granted', location.orig in, location.origin);
65 } 67 }
66 getActiveServiceWorkerWithMessagePort(test, script, scope).then(functi on(workerInfo) { 68 getActiveServiceWorkerWithMessagePort(test, script, scope).then(functi on(workerInfo) {
67 // (1) Tell the Service Worker to display a Web Notification. 69 // (1) Tell the Service Worker to display a Web Notification.
68 workerInfo.port.postMessage({ 70 workerInfo.port.postMessage({
69 command: 'show', 71 command: 'show',
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 118
117 test.done(); 119 test.done();
118 }); 120 });
119 }); 121 });
120 }).catch(unreached_rejection(test)); 122 }).catch(unreached_rejection(test));
121 123
122 }, 'Clicking on a notification displayed by a Service Worker the notificat ionclick event.'); 124 }, 'Clicking on a notification displayed by a Service Worker the notificat ionclick event.');
123 </script> 125 </script>
124 </body> 126 </body>
125 </html> 127 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698