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

Side by Side Diff: LayoutTests/http/tests/notifications/serviceworker-notificationclick-event-reflection.html

Issue 1263043003: Add NotificationAction.action member (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@actions
Patch Set: Fix rebase 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 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.< /title> 4 <title>Notifications: Property reflection in the "notificationclick" event.< /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 16 matching lines...) Expand all
27 // an absolute URL, which should probably be the given relative UR L. 27 // an absolute URL, which should probably be the given relative UR L.
28 icon: 'https://example/icon.png', 28 icon: 'https://example/icon.png',
29 vibrate: [100, 200, 300], 29 vibrate: [100, 200, 300],
30 silent: false, 30 silent: false,
31 data: [ 31 data: [
32 { property: 'foobar', 32 { property: 'foobar',
33 string: '\uDFFF\u0000\uDBFF', 33 string: '\uDFFF\u0000\uDBFF',
34 scalar: true }, 34 scalar: true },
35 12.15 35 12.15
36 ], 36 ],
37 actions: [{title: "Action 1"}, {title: "Action 2"}, {title: "Actio n 3"}] 37 actions: [{ action: "one", title: "Action 1" },
38 { action: "two", title: "Action 2" },
39 { action: "three", title: "Action 3" }]
38 }; 40 };
39 41
40 testRunner.setPermission('notifications', 'granted', location.origin, location.origin); 42 testRunner.setPermission('notifications', 'granted', location.origin, location.origin);
41 getActiveServiceWorkerWithMessagePort(test, script, scope).then(functi on(workerInfo) { 43 getActiveServiceWorkerWithMessagePort(test, script, scope).then(functi on(workerInfo) {
42 // (1) Tell the Service Worker to display a Web Notification. 44 // (1) Tell the Service Worker to display a Web Notification.
43 workerInfo.port.postMessage({ 45 workerInfo.port.postMessage({
44 command: 'show', 46 command: 'show',
45 47
46 title: scope, 48 title: scope,
47 options: options 49 options: options
(...skipping 27 matching lines...) Expand all
75 }); 77 });
76 78
77 test.done(); 79 test.done();
78 }); 80 });
79 }).catch(unreached_rejection(test)); 81 }).catch(unreached_rejection(test));
80 82
81 }, 'Clicking on a notification displayed by a Service Worker the notificat ionclick event.'); 83 }, 'Clicking on a notification displayed by a Service Worker the notificat ionclick event.');
82 </script> 84 </script>
83 </body> 85 </body>
84 </html> 86 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698