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

Side by Side Diff: LayoutTests/http/tests/notifications/resources/serviceworker-notification-event.js

Issue 1321453007: Some random Web Notification cleanups (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 importScripts('../../serviceworker/resources/worker-testharness.js'); 1 importScripts('../../serviceworker/resources/worker-testharness.js');
2 importScripts('/resources/testharness-helpers.js'); 2 importScripts('/resources/testharness-helpers.js');
3 3
4 test(function() { 4 test(function() {
5 assert_true('NotificationEvent' in self); 5 assert_true('NotificationEvent' in self);
6 6
7 var event = new NotificationEvent('NotificationEvent'); 7 var event = new NotificationEvent('NotificationEvent');
8 assert_equals(event.type, 'NotificationEvent'); 8 assert_equals(event.type, 'NotificationEvent');
9 assert_will_be_idl_attribute(event, 'notification'); 9 assert_will_be_idl_attribute(event, 'notification');
10 assert_will_be_idl_attribute(event, 'action'); 10 assert_will_be_idl_attribute(event, 'action');
11 assert_equals(event.cancelable, false); 11 assert_equals(event.cancelable, false);
12 assert_equals(event.bubbles, false); 12 assert_equals(event.bubbles, false);
13 assert_equals(event.notification, null); 13 assert_equals(event.notification, null);
14 assert_equals(event.action, ""); 14 assert_equals(event.action, "");
15 assert_inherits(event, 'waitUntil'); 15 assert_inherits(event, 'waitUntil');
16 16
17 var eventWithInit = new NotificationEvent('NotificationEvent', 17 var eventWithInit = new NotificationEvent('NotificationEvent',
18 { cancelable: true, 18 { cancelable: true,
19 bubbles: true 19 bubbles: true
20 }); 20 });
21 assert_equals(eventWithInit.cancelable, true); 21 assert_equals(eventWithInit.cancelable, true);
22 assert_equals(eventWithInit.bubbles, true); 22 assert_equals(eventWithInit.bubbles, true);
23 23
24 }, 'NotificationEvent is exposed, and has the expected interface.'); 24 }, 'NotificationEvent is exposed, and has the expected interface.');
25 25
26 test(function() { 26 test(function() {
27 assert_will_be_idl_attribute(self, 'onnotificationclick', 27 assert_will_be_idl_attribute(self, 'onnotificationclick',
28 'The notificationclick event exists.'); 28 'The notificationclick event exists.');
29 assert_will_be_idl_attribute(self, 'onnotificationerror',
30 'The notificationerror event exists.');
31 29
32 }, 'The notificationclick and notificationerror events exist on the global scope .'); 30 }, 'The notificationclick event exist on the global scope.');
whywhat 2015/08/27 19:16:47 nit: exists
Peter Beverloo 2015/08/27 19:20:00 Done.
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698