OLD | NEW |
1 library range_test; | 1 import 'dart:html'; |
2 | 2 |
3 import 'dart:html'; | 3 import 'package:expect/minitest.dart'; |
4 import 'package:unittest/unittest.dart'; | |
5 import 'package:unittest/html_individual_config.dart'; | |
6 | 4 |
7 main() { | 5 main() { |
8 useHtmlIndividualConfiguration(); | |
9 | |
10 group('supported', () { | 6 group('supported', () { |
11 test('supports_createContextualFragment', () { | 7 test('supports_createContextualFragment', () { |
12 expect(Range.supportsCreateContextualFragment, isTrue); | 8 expect(Range.supportsCreateContextualFragment, isTrue); |
13 }); | 9 }); |
14 }); | 10 }); |
15 | 11 |
16 group('functional', () { | 12 group('functional', () { |
17 test('supported works', () { | 13 test('supported works', () { |
18 var range = new Range(); | 14 var range = new Range(); |
19 range.selectNode(document.body); | 15 range.selectNode(document.body); |
20 | 16 |
21 var expectation = Range.supportsCreateContextualFragment ? | 17 var expectation = Range.supportsCreateContextualFragment ? |
22 returnsNormally : throws; | 18 returnsNormally : throws; |
23 | 19 |
24 expect(() { | 20 expect(() { |
25 range.createContextualFragment('<div></div>'); | 21 range.createContextualFragment('<div></div>'); |
26 }, expectation); | 22 }, expectation); |
27 }); | 23 }); |
28 }); | 24 }); |
29 } | 25 } |
OLD | NEW |