| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 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 | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import 'dart:html'; | 5 import 'dart:html'; |
| 6 import 'package:unittest/unittest.dart'; | 6 import 'package:unittest/unittest.dart'; |
| 7 import 'package:unittest/html_config.dart'; | 7 import 'package:unittest/html_config.dart'; |
| 8 import 'package:polymer/platform.dart' as Platform; | 8 import 'package:polymer/platform.dart' as Platform; |
| 9 import 'package:polymer/polymer.dart'; | 9 import 'package:polymer/polymer.dart'; |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 @observable String str = 'str'; | 23 @observable String str = 'str'; |
| 24 @observable Object obj; | 24 @observable Object obj; |
| 25 } | 25 } |
| 26 | 26 |
| 27 class XCompose extends PolymerElement { | 27 class XCompose extends PolymerElement { |
| 28 XCompose.created() : super.created(); | 28 XCompose.created() : super.created(); |
| 29 | 29 |
| 30 @observable bool zim = false; | 30 @observable bool zim = false; |
| 31 } | 31 } |
| 32 | 32 |
| 33 main() { | 33 @initMethod _main() { |
| 34 useHtmlConfiguration(); | 34 useHtmlConfiguration(); |
| 35 | 35 |
| 36 // Most tests use @CustomTag, here we test out the impertive register: | 36 // Most tests use @CustomTag, here we test out the impertive register: |
| 37 Polymer.register('x-foo', XFoo); | 37 Polymer.register('x-foo', XFoo); |
| 38 Polymer.register('x-bar', XBar); | 38 Polymer.register('x-bar', XBar); |
| 39 Polymer.register('x-compose', XCompose); | 39 Polymer.register('x-compose', XCompose); |
| 40 | 40 |
| 41 test('property attribute reflection', () { | 41 test('property attribute reflection', () { |
| 42 var xcompose = query('x-compose').xtag; | 42 var xcompose = query('x-compose').xtag; |
| 43 var xfoo = query('x-foo').xtag; | 43 var xfoo = query('x-foo').xtag; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 Platform.endOfMicrotask(expectAsync0(() { | 107 Platform.endOfMicrotask(expectAsync0(() { |
| 108 expect(xbar.attributes['obj'], objAttr, reason: | 108 expect(xbar.attributes['obj'], objAttr, reason: |
| 109 'do not reflect property with default type of object'); | 109 'do not reflect property with default type of object'); |
| 110 })); | 110 })); |
| 111 })); | 111 })); |
| 112 })); | 112 })); |
| 113 })); | 113 })); |
| 114 })); | 114 })); |
| 115 }); | 115 }); |
| 116 } | 116 } |
| OLD | NEW |