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

Unified Diff: pkg/polymer/test/register_test.dart

Issue 33903003: Fixing polymer element registration when extending tag extensions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Sync to ToT Created 7 years, 2 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
Index: pkg/polymer/test/register_test.dart
diff --git a/pkg/polymer/test/register_test.dart b/pkg/polymer/test/register_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..070ee0f4b3ae23db19f48a68e93603533e8cde3a
--- /dev/null
+++ b/pkg/polymer/test/register_test.dart
@@ -0,0 +1,42 @@
+// Copyright (c) 2013, 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.
+
+import 'dart:html';
+import 'package:unittest/unittest.dart';
+import 'package:unittest/html_config.dart';
+import 'package:polymer/polymer.dart';
+
+@CustomTag('x-html')
+class XHtmlElement extends PolymerElement {
+ XHtmlElement.created() : super.created();
+}
+
+@CustomTag('x-html-two')
+class XHtml2Element extends XHtmlElement {
+ XHtml2Element.created() : super.created();
+}
+
+@CustomTag('x-div')
+class XDivElement extends DivElement with Polymer, Observable {
+ XDivElement.created() : super.created();
+}
+
+@CustomTag('x-div-two')
+class XDiv2lElement extends XDivElement {
+ XDiv2lElement.created() : super.created();
+}
+
+main() {
+ initPolymer();
+ useHtmlConfiguration();
+
+ setUp(() => Polymer.onReady);
+
+ test('elements upgraded', () {
+ expect(querySelector('x-html') is XHtmlElement, isTrue);
+ expect(querySelector('x-html-two') is XHtml2Element, isTrue);
+ expect(querySelector('#x-div') is XDivElement, isTrue);
+ expect(querySelector('#x-div-two') is XDiv2Element, isTrue);
+ });
+}

Powered by Google App Engine
This is Rietveld 408576698