| Index: tests/html/custom/document_register_template_test.dart
|
| diff --git a/tests/html/custom/document_register_template_test.dart b/tests/html/custom/document_register_template_test.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..11b0b8da0c3ba839818aab1b14ccaf8faca21b90
|
| --- /dev/null
|
| +++ b/tests/html/custom/document_register_template_test.dart
|
| @@ -0,0 +1,24 @@
|
| +import 'package:unittest/unittest.dart';
|
| +import 'package:unittest/html_config.dart';
|
| +import 'dart:html';
|
| +import '../utils.dart';
|
| +
|
| +main() {
|
| + useHtmlConfiguration();
|
| +
|
| + setUp(() => customElementsReady);
|
| +
|
| + test('can register custom template with webcomponents-lite polyfill', () {
|
| + document.registerElement('my-element', MyElement, extendsTag: 'template');
|
| + var e = new Element.tag('template', 'my-element');
|
| + document.body.append(e);
|
| + expect(e is TemplateElement, isTrue);
|
| + expect(e.method(), 'value');
|
| + });
|
| +}
|
| +
|
| +
|
| +class MyElement extends TemplateElement {
|
| + MyElement.created() : super.created();
|
| + method() => 'value';
|
| +}
|
|
|