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

Unified Diff: pkg/web_components/test/interop_test.dart

Issue 341003002: web_components: fix extending another custom element (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 months 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 | « pkg/web_components/pubspec.yaml ('k') | pkg/web_components/test/interop_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/web_components/test/interop_test.dart
diff --git a/pkg/web_components/test/interop_test.dart b/pkg/web_components/test/interop_test.dart
index cbad6e192e91d8830eb843ce0acdfc12aaabd722..20cce29cdce02f9cbe4e42c9d8a301cb89ae0f75 100644
--- a/pkg/web_components/test/interop_test.dart
+++ b/pkg/web_components/test/interop_test.dart
@@ -120,6 +120,16 @@ main() {
expect(c.x, 7);
expect(c.wrapperCount, 6);
});
+
+ test('element can extend another element', () {
+ registerDartType('x-e', XEWrapper);
+ context.callMethod('addE');
+
+ var e = document.querySelector('x-e');
+ expect(e is XEWrapper, isTrue);
+ expect(e.x, 8);
+ expect(e.y, 9);
+ });
}
int _count = 0;
@@ -145,3 +155,9 @@ class XCWrapper extends HtmlElement with Wrapper {
class XDWrapper extends HtmlElement with Wrapper {
XDWrapper.created() : super.created();
}
+
+class XEWrapper extends HtmlElement with Wrapper {
+ XEWrapper.created() : super.created();
+
+ int get y => new JsObject.fromBrowserObject(this)['y'];
+}
« no previous file with comments | « pkg/web_components/pubspec.yaml ('k') | pkg/web_components/test/interop_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698