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/polymer.dart'; | 8 import 'package:polymer/polymer.dart'; |
9 | 9 |
10 @CustomTag('my-child-element') | 10 @CustomTag('my-child-element') |
(...skipping 15 matching lines...) Expand all Loading... |
26 MyElement.created() : super.created(); | 26 MyElement.created() : super.created(); |
27 } | 27 } |
28 | 28 |
29 main() { | 29 main() { |
30 initPolymer(); | 30 initPolymer(); |
31 useHtmlConfiguration(); | 31 useHtmlConfiguration(); |
32 | 32 |
33 setUp(() => Polymer.onReady); | 33 setUp(() => Polymer.onReady); |
34 | 34 |
35 test('attribute reflected to property name', () { | 35 test('attribute reflected to property name', () { |
36 var child = query('my-element').shadowRoot.query('my-child-element'); | 36 var child = querySelector('my-element') |
| 37 .shadowRoot.querySelector('my-child-element'); |
37 expect(child.lowercase, 11); | 38 expect(child.lowercase, 11); |
38 expect(child.camelCase, 11); | 39 expect(child.camelCase, 11); |
39 | 40 |
40 expect('11', child.attributes['lowercase']); | 41 expect('11', child.attributes['lowercase']); |
41 expect('11', child.attributes['camelcase']); | 42 expect('11', child.attributes['camelcase']); |
42 }); | 43 }); |
43 } | 44 } |
OLD | NEW |