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

Side by Side Diff: tests/html/notifications_test.dart

Issue 12053002: Status updates for Safari - part2 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 | « tests/html/html.status ('k') | tests/html/shadow_dom_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 library NotificationsTest; 1 library NotificationsTest;
2 import '../../pkg/unittest/lib/unittest.dart'; 2 import '../../pkg/unittest/lib/unittest.dart';
3 import '../../pkg/unittest/lib/html_individual_config.dart'; 3 import '../../pkg/unittest/lib/html_individual_config.dart';
4 import 'dart:html'; 4 import 'dart:html';
5 5
6 main() { 6 main() {
7 useHtmlIndividualConfiguration(); 7 useHtmlIndividualConfiguration();
8 8
9 group('supported', () { 9 group('supported', () {
10 test('supported', () { 10 test('supported', () {
11 expect(NotificationCenter.supported, true); 11 expect(NotificationCenter.supported, true);
12 }); 12 });
13 }); 13 });
14 14
15 group('unsupported throws', () { 15 group('unsupported_throws', () {
16 test('createNotification', () { 16 test('createNotification', () {
17 var expectation = NotificationCenter.supported ? returnsNormally : throws; 17 var expectation = NotificationCenter.supported ? returnsNormally : throws;
18 expect(() { window.notifications.createNotification; }, expectation); 18 expect(() { window.notifications.createNotification; }, expectation);
19 }); 19 });
20 }); 20 });
21 21
22 group('webkitNotifications', () { 22 group('webkitNotifications', () {
23 if (NotificationCenter.supported) { 23 if (NotificationCenter.supported) {
24 test('DomException', () { 24 test('DomException', () {
25 try { 25 try {
26 window.notifications.createNotification('', '', ''); 26 window.notifications.createNotification('', '', '');
27 } on DomException catch (e) { 27 } on DomException catch (e) {
28 expect(e.name, DomException.SECURITY); 28 expect(e.name, DomException.SECURITY);
29 } 29 }
30 }); 30 });
31 } 31 }
32 }); 32 });
33 } 33 }
34 34
OLDNEW
« no previous file with comments | « tests/html/html.status ('k') | tests/html/shadow_dom_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698