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

Unified Diff: tests/html/media_stream_test.dart

Issue 12047020: Adding supported checks to media events (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 | « tests/html/html.status ('k') | tools/dom/scripts/systemhtml.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/media_stream_test.dart
diff --git a/tests/html/media_stream_test.dart b/tests/html/media_stream_test.dart
index 1e97511a617e1549c68c168b2f451d9fb935fe88..dc4d2ec1e4210873782a18ee67d90736d4c94b3e 100644
--- a/tests/html/media_stream_test.dart
+++ b/tests/html/media_stream_test.dart
@@ -16,6 +16,34 @@ main() {
});
});
- // No additional tests right now since this API prompts for user input to
- // continue.
+ group('supported_MediaStreamEvent', () {
+ test('supported', () {
+ expect(MediaStreamEvent.supported, true);
+ });
+ });
+
+ group('supported_MediaStreamTrackEvent', () {
+ test('supported', () {
+ expect(MediaStreamTrackEvent.supported, true);
+ });
+ });
+
+ group('constructors', () {
+ test('MediaStreamEvent', () {
+ var expectation = MediaStreamEvent.supported ? returnsNormally : throws;
+ expect(() {
+ var event = document.$dom_createEvent('MediaStreamEvent');
+ expect(event is MediaStreamEvent, isTrue);
+ }, expectation);
+ });
+
+ test('MediaStreamTrackEvent', () {
+ var expectation =
+ MediaStreamTrackEvent.supported ? returnsNormally : throws;
+ expect(() {
+ var event = document.$dom_createEvent('MediaStreamTrackEvent');
+ expect(event is MediaStreamTrackEvent, isTrue);
+ }, expectation);
+ });
+ });
}
« no previous file with comments | « tests/html/html.status ('k') | tools/dom/scripts/systemhtml.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698