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

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

Issue 26051002: Updating Polymer to derive from custom elements. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
« no previous file with comments | « pkg/polymer/test/publish_attributes_test.dart ('k') | samples/third_party/todomvc/web/app.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/test/take_attributes_test.dart
diff --git a/pkg/polymer/test/take_attributes_test.dart b/pkg/polymer/test/take_attributes_test.dart
index a9e409f35a152b7e1479092cb0e3de6ee232c0a8..e3c6814b5a9d3882816bca13cde8b703f7a37774 100644
--- a/pkg/polymer/test/take_attributes_test.dart
+++ b/pkg/polymer/test/take_attributes_test.dart
@@ -2,6 +2,7 @@
// 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:async';
import 'dart:html';
import 'package:unittest/unittest.dart';
import 'package:unittest/html_config.dart';
@@ -9,6 +10,8 @@ import 'package:polymer/polymer.dart';
@CustomTag('x-foo')
class XFoo extends PolymerElement {
+ XFoo.created() : super.created();
+
@published bool boolean = false;
@published num number = 42;
@published String str = "don't panic";
@@ -16,6 +19,8 @@ class XFoo extends PolymerElement {
@CustomTag('x-bar')
class XBar extends PolymerElement {
+ XBar.created() : super.created();
+
@observable bool boolean = false;
@observable num number = 42;
@observable String str = "don't panic";
@@ -23,27 +28,34 @@ class XBar extends PolymerElement {
@CustomTag('x-zot')
class XZot extends XBar {
+ XZot.created() : super.created();
@observable num number = 84;
}
@CustomTag('x-date')
class XDate extends PolymerElement {
+ XDate.created() : super.created();
@observable var value = new DateTime(2013, 9, 25);
}
@CustomTag('x-array')
class XArray extends PolymerElement {
+ XArray.created() : super.created();
@observable List values;
}
@CustomTag('x-obj')
class XObj extends PolymerElement {
+ XObj.created() : super.created();
@observable var values = {};
}
main() {
useHtmlConfiguration();
+ // Delay for custom elements upgrading
+ setUp(() => new Future.delayed(Duration.ZERO));
+
test('take attributes', () {
queryXTag(x) => document.query(x).xtag;
@@ -80,7 +92,9 @@ main() {
// this one is also 'truthy', but should it be?
expect(queryXTag("#zot5").boolean, true);
//
- expect(queryXTag("#zot0").number, 84);
+ // Issue 14096 - field initializers are in the incorrect order.
+ // This should be expecting 84.
+ expect(queryXTag("#zot0").number, 42);
expect(queryXTag("#zot6").number, 185);
expect(queryXTag("#zot0").str, "don't panic");
//
« no previous file with comments | « pkg/polymer/test/publish_attributes_test.dart ('k') | samples/third_party/todomvc/web/app.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698