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

Side by Side 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, 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 import 'dart:html';
6 import 'package:unittest/unittest.dart';
7 import 'package:unittest/html_config.dart';
8 import 'package:polymer/polymer.dart';
9
10 @CustomTag('x-html')
11 class XHtmlElement extends PolymerElement {
12 XHtmlElement.created() : super.created();
13 }
14
15 @CustomTag('x-html-two')
16 class XHtml2Element extends XHtmlElement {
17 XHtml2Element.created() : super.created();
18 }
19
20 @CustomTag('x-div')
21 class XDivElement extends DivElement with Polymer, Observable {
22 XDivElement.created() : super.created();
23 }
24
25 @CustomTag('x-div-two')
26 class XDiv2lElement extends XDivElement {
27 XDiv2lElement.created() : super.created();
28 }
29
30 main() {
31 initPolymer();
32 useHtmlConfiguration();
33
34 setUp(() => Polymer.onReady);
35
36 test('elements upgraded', () {
37 expect(querySelector('x-html') is XHtmlElement, isTrue);
38 expect(querySelector('x-html-two') is XHtml2Element, isTrue);
39 expect(querySelector('#x-div') is XDivElement, isTrue);
40 expect(querySelector('#x-div-two') is XDiv2Element, isTrue);
41 });
42 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698