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

Side by Side Diff: pkg/polymer/test/prop_attr_bind_reflection_test.dart

Issue 207433002: Changes in polymer-expressions to prepare for codegen in polymer: (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/polymer/lib/src/instance.dart ('k') | pkg/polymer_expressions/CHANGELOG.md » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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')
11 class MyChildElement extends PolymerElement { 11 class MyChildElement extends PolymerElement {
12 @published int camelCase; 12 @published int camelCase;
13 @published int lowercase; 13 @published int lowercase;
14 14
15 // TODO(sigmund): remove once codegen in polymer is turned on.
16 @reflectable get attributes => super.attributes;
17
15 MyChildElement.created() : super.created(); 18 MyChildElement.created() : super.created();
16 19
17 // Make this a no-op, so we can verify the initial 20 // Make this a no-op, so we can verify the initial
18 // reflectPropertyToAttribute works. 21 // reflectPropertyToAttribute works.
19 observeAttributeProperty(name) { } 22 observeAttributeProperty(name) { }
20 } 23 }
21 24
22 @CustomTag('my-element') 25 @CustomTag('my-element')
23 class MyElement extends PolymerElement { 26 class MyElement extends PolymerElement {
24 @observable int volume = 11; 27 @observable int volume = 11;
(...skipping 10 matching lines...) Expand all
35 test('attribute reflected to property name', () { 38 test('attribute reflected to property name', () {
36 var child = querySelector('my-element') 39 var child = querySelector('my-element')
37 .shadowRoot.querySelector('my-child-element'); 40 .shadowRoot.querySelector('my-child-element');
38 expect(child.lowercase, 11); 41 expect(child.lowercase, 11);
39 expect(child.camelCase, 11); 42 expect(child.camelCase, 11);
40 43
41 expect('11', child.attributes['lowercase']); 44 expect('11', child.attributes['lowercase']);
42 expect('11', child.attributes['camelcase']); 45 expect('11', child.attributes['camelcase']);
43 }); 46 });
44 } 47 }
OLDNEW
« no previous file with comments | « pkg/polymer/lib/src/instance.dart ('k') | pkg/polymer_expressions/CHANGELOG.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698