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

Unified Diff: tests/html/custom/document_register_template_test.dart

Issue 2493703004: Support extending TemplateElement in IE11 + webcomponents-lite.js (Closed)
Patch Set: Created 4 years, 1 month 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 | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | tests/html/custom/document_register_template_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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';
+}
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | tests/html/custom/document_register_template_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698