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

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

Issue 1313013006: Enable test for notifications requireInteraction (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@requireinteraction1
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | no next file » | 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: 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 return; 64 return;
65 } 65 }
66 66
67 // (3) Listen for confirmation from the Service Worker that th e 67 // (3) Listen for confirmation from the Service Worker that th e
68 // notification has been clicked on. Make sure that all proper ties 68 // notification has been clicked on. Make sure that all proper ties
69 // set on the Notification object are as expected. 69 // set on the Notification object are as expected.
70 assert_equals(event.data.command, 'click', 'The notification w as expected to be clicked.'); 70 assert_equals(event.data.command, 'click', 'The notification w as expected to be clicked.');
71 71
72 options.actions = options.actions.slice(0, Notification.maxAct ions); 72 options.actions = options.actions.slice(0, Notification.maxAct ions);
73 Object.keys(options).forEach(function(key) { 73 Object.keys(options).forEach(function(key) {
74 if (key == 'requireInteraction') {
75 // TODO(johnme): requireInteraction is not yet seriali zed properly.
76 return;
77 }
78 if (typeof options[key] == 'object') 74 if (typeof options[key] == 'object')
79 assert_object_equals(event.data.notification[key], opt ions[key], 'The ' + key + ' field must be the same.'); 75 assert_object_equals(event.data.notification[key], opt ions[key], 'The ' + key + ' field must be the same.');
80 else 76 else
81 assert_equals(event.data.notification[key], options[ke y], 'The ' + key + ' field must be the same.'); 77 assert_equals(event.data.notification[key], options[ke y], 'The ' + key + ' field must be the same.');
82 }); 78 });
83 79
84 test.done(); 80 test.done();
85 }); 81 });
86 }).catch(unreached_rejection(test)); 82 }).catch(unreached_rejection(test));
87 83
88 }, 'Clicking on a notification displayed by a Service Worker the notificat ionclick event.'); 84 }, 'Clicking on a notification displayed by a Service Worker the notificat ionclick event.');
89 </script> 85 </script>
90 </body> 86 </body>
91 </html> 87 </html>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698