| Index: test/codegen/lib/html/mediasource_test.dart
|
| diff --git a/test/codegen/lib/html/mediasource_test.dart b/test/codegen/lib/html/mediasource_test.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..7db8af87166cc69f9e03a0cb069e16576255ec61
|
| --- /dev/null
|
| +++ b/test/codegen/lib/html/mediasource_test.dart
|
| @@ -0,0 +1,42 @@
|
| +library mediasource_test;
|
| +
|
| +import 'package:unittest/unittest.dart';
|
| +import 'package:unittest/html_individual_config.dart';
|
| +import 'dart:html';
|
| +import 'dart:typed_data';
|
| +import 'dart:async';
|
| +
|
| +main() {
|
| + useHtmlIndividualConfiguration();
|
| +
|
| + var isMediaSource = predicate((x) => x is MediaSource, 'is a MediaSource');
|
| +
|
| + group('supported', () {
|
| + test('supported', () {
|
| + expect(MediaSource.supported, true);
|
| + });
|
| + });
|
| +
|
| + // TODO(alanknight): Actually exercise this, right now the tests are trivial.
|
| + group('functional', () {
|
| + var source;
|
| + if (MediaSource.supported) {
|
| + source = new MediaSource();
|
| + }
|
| +
|
| + test('constructorTest', () {
|
| + if (MediaSource.supported) {
|
| + expect(source, isNotNull);
|
| + expect(source, isMediaSource);
|
| + }
|
| + });
|
| +
|
| + test('media types', () {
|
| + if (MediaSource.supported) {
|
| + expect(MediaSource.isTypeSupported('text/html'), false);
|
| + expect(MediaSource.isTypeSupported('video/webm;codecs="vp8,vorbis"'),
|
| + true);
|
| + }
|
| + });
|
| + });
|
| +}
|
|
|