Files
sdk/tests/html/media_stream_test.dart
T
blois@google.com 93e44a5da1 Fixing media status results on Firefox.
Basically the 'supported' group was executing the events tests as well, causing supported to fail. To fix this, I had to give the general group a name that the others did not begin with.

BUG=

Review URL: https://codereview.chromium.org//12041031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17432 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-22 23:23:09 +00:00

50 lines
1.4 KiB
Dart

// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
library media_stream_test;
import '../../pkg/unittest/lib/unittest.dart';
import '../../pkg/unittest/lib/html_individual_config.dart';
import 'dart:html';
main() {
useHtmlIndividualConfiguration();
group('supported_media', () {
test('supported', () {
expect(MediaStream.supported, true);
});
});
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 = new Event.eventType('MediaStreamEvent', 'media');
expect(event is MediaStreamEvent, isTrue);
}, expectation);
});
test('MediaStreamTrackEvent', () {
var expectation =
MediaStreamTrackEvent.supported ? returnsNormally : throws;
expect(() {
var event = new Event.eventType('MediaStreamTrackEvent', 'media');
expect(event is MediaStreamTrackEvent, isTrue);
}, expectation);
});
});
}