Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: tests/html/mediasource_test.dart

Issue 990383002: Add MediaSource.supported, annotations for supported browsers, and a minimal test (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/scripts/dartmetadata.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/mediasource_test.dart
diff --git a/tests/html/mediasource_test.dart b/tests/html/mediasource_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..7db8af87166cc69f9e03a0cb069e16576255ec61
--- /dev/null
+++ b/tests/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';
terry 2015/03/10 12:43:51 Is this needed?
+
+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);
+ }
+ });
+ });
+}
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/scripts/dartmetadata.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698