blob: f24b72d539437bf19fe2961c53be7c8ad0f035ae [file] [log] [blame]
import 'dart:html';
import 'dart:typed_data';
import 'package:expect/minitest.dart';
main() {
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);
}
});
});
}