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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/scripts/dartmetadata.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 }
OLDNEW
« 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