OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library notification_test; | |
6 | |
7 import 'package:unittest/unittest.dart'; | |
8 import 'package:unittest/html_individual_config.dart'; | |
9 import 'dart:html'; | 5 import 'dart:html'; |
10 | 6 |
| 7 import 'package:expect/minitest.dart'; |
| 8 |
11 main() { | 9 main() { |
12 useHtmlIndividualConfiguration(); | |
13 | |
14 group('supported_notification', () { | 10 group('supported_notification', () { |
15 test('supported', () { | 11 test('supported', () { |
16 expect(Notification.supported, true); | 12 expect(Notification.supported, true); |
17 }); | 13 }); |
18 }); | 14 }); |
19 | 15 |
20 group('constructors', () { | 16 group('constructors', () { |
21 // Test that we create the notification and that the parameters have | 17 // Test that we create the notification and that the parameters have |
22 // the expected values. Note that these won't actually display, because | 18 // the expected values. Note that these won't actually display, because |
23 // we haven't asked for permission, which would have to be done | 19 // we haven't asked for permission, which would have to be done |
(...skipping 16 matching lines...) Expand all Loading... |
40 expect(allSpecified.body, "All parameters set"); | 36 expect(allSpecified.body, "All parameters set"); |
41 var icon = allSpecified.icon; | 37 var icon = allSpecified.icon; |
42 var tail = Uri.parse(icon).pathSegments.last; | 38 var tail = Uri.parse(icon).pathSegments.last; |
43 expect(tail, "icon.png"); | 39 expect(tail, "icon.png"); |
44 expect(allSpecified.tag, "tag"); | 40 expect(allSpecified.tag, "tag"); |
45 expect(allSpecified.lang, "en_US"); | 41 expect(allSpecified.lang, "en_US"); |
46 }, expectation); | 42 }, expectation); |
47 }); | 43 }); |
48 }); | 44 }); |
49 } | 45 } |
OLD | NEW |