mirror of
https://github.com/dart-lang/sdk
synced 2024-09-18 21:41:19 +00:00
00f641fc77
BUG= Review URL: https://codereview.chromium.org//988243005 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44332 260f80e4-7a28-3924-810f-c04153c831b5
43 lines
1.7 KiB
Dart
43 lines
1.7 KiB
Dart
// Copyright (c) 2012, 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 element_types_constructors1_test;
|
|
|
|
import 'package:unittest/unittest.dart';
|
|
import 'package:unittest/html_individual_config.dart';
|
|
import 'dart:html';
|
|
|
|
main() {
|
|
check(String name, bool fn(), [bool supported = true]) {
|
|
test(name, () {
|
|
var expectation = supported ? returnsNormally : throws;
|
|
expect(() {
|
|
expect(fn(), isTrue);
|
|
}, expectation);
|
|
});
|
|
}
|
|
|
|
group('constructors', () {
|
|
check('a', () => new AnchorElement() is AnchorElement);
|
|
check('area', () => new AreaElement() is AreaElement);
|
|
check('audio', () => new AudioElement() is AudioElement);
|
|
check('body', () => new BodyElement() is BodyElement);
|
|
check('br', () => new BRElement() is BRElement);
|
|
check('base', () => new BaseElement() is BaseElement);
|
|
check('button', () => new ButtonElement() is ButtonElement);
|
|
check('canvas', () => new CanvasElement() is CanvasElement);
|
|
check('caption', () => new TableCaptionElement() is TableCaptionElement);
|
|
check('content',
|
|
() => new ContentElement() is ContentElement, ContentElement.supported);
|
|
check('details', () => new DetailsElement() is DetailsElement,
|
|
DetailsElement.supported);
|
|
check('datalist', () => new DataListElement() is DataListElement,
|
|
DataListElement.supported);
|
|
check('dl', () => new DListElement() is DListElement);
|
|
check('div', () => new DivElement() is DivElement);
|
|
check('embed',
|
|
() => new EmbedElement() is EmbedElement, EmbedElement.supported);
|
|
});
|
|
}
|