OLD | NEW |
---|---|
(Empty) | |
1 library mediasource_test; | |
2 | |
3 import 'package:unittest/unittest.dart'; | |
4 import 'package:unittest/html_individual_config.dart'; | |
5 import 'dart:html'; | |
6 import 'dart:typed_data'; | |
7 import 'dart:async'; | |
terry
2015/03/10 12:43:51
Is this needed?
| |
8 | |
9 main() { | |
10 useHtmlIndividualConfiguration(); | |
11 | |
12 var isMediaSource = predicate((x) => x is MediaSource, 'is a MediaSource'); | |
13 | |
14 group('supported', () { | |
15 test('supported', () { | |
16 expect(MediaSource.supported, true); | |
17 }); | |
18 }); | |
19 | |
20 // TODO(alanknight): Actually exercise this, right now the tests are trivial. | |
21 group('functional', () { | |
22 var source; | |
23 if (MediaSource.supported) { | |
24 source = new MediaSource(); | |
25 } | |
26 | |
27 test('constructorTest', () { | |
28 if (MediaSource.supported) { | |
29 expect(source, isNotNull); | |
30 expect(source, isMediaSource); | |
31 } | |
32 }); | |
33 | |
34 test('media types', () { | |
35 if (MediaSource.supported) { | |
36 expect(MediaSource.isTypeSupported('text/html'), false); | |
37 expect(MediaSource.isTypeSupported('video/webm;codecs="vp8,vorbis"'), | |
38 true); | |
39 } | |
40 }); | |
41 }); | |
42 } | |
OLD | NEW |