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

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

Issue 90113002: fix custom elements that extend tags like "section" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: revert whitespace changes Created 7 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/dartium/html_dartium.dart ('k') | tools/dom/src/dart2js_CustomElementSupport.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/custom/constructor_calls_created_synchronously_test.dart
diff --git a/tests/html/custom/constructor_calls_created_synchronously_test.dart b/tests/html/custom/constructor_calls_created_synchronously_test.dart
index f9f242d8a7dd7b43f671ba7c646391c4aaabfc9f..d2bc3afdf746ff66e79a7aaca02216c4ad573d67 100644
--- a/tests/html/custom/constructor_calls_created_synchronously_test.dart
+++ b/tests/html/custom/constructor_calls_created_synchronously_test.dart
@@ -49,4 +49,18 @@ main() {
expect(A.ncallbacks, 2);
expect(b is A, isTrue);
});
+
+ test("can extend elements that don't have special prototypes", () {
+ document.register('fancy-section', FancySection, extendsTag: 'section');
+ var fancy = document.createElement('section', 'fancy-section');
+ expect(fancy is FancySection, true, reason: 'fancy-section was registered');
+ expect(fancy.wasCreated, true, reason: 'FancySection ctor was called');
+ });
+}
+
+class FancySection extends HtmlElement {
+ bool wasCreated = false;
+ FancySection.created() : super.created() {
+ wasCreated = true;
+ }
}
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/src/dart2js_CustomElementSupport.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698