7091266045
Bug: Change-Id: Ia0bfee80bf788a6eda83813fc986182a0d56a648 Reviewed-on: https://dart-review.googlesource.com/9980 Commit-Queue: Jakob Roland Andersen <jakobr@google.com> Reviewed-by: Florian Loitsch <floitsch@google.com>
38 lines
892 B
Dart
38 lines
892 B
Dart
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);
|
|
}
|
|
});
|
|
});
|
|
}
|