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

Side by Side Diff: pkg/template_binding/test/custom_element_bindings_test.dart

Issue 33173004: remove type annotation from AttributeMapWrapper (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | 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 library template_binding.test.custom_element_bindings_test; 5 library template_binding.test.custom_element_bindings_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:html'; 8 import 'dart:html';
9 import 'package:template_binding/template_binding.dart'; 9 import 'package:template_binding/template_binding.dart';
10 import 'package:observe/observe.dart' show toObservable; 10 import 'package:observe/observe.dart' show toObservable;
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 if (property == 'scary-monster') node.scaryMonster = newValue; 202 if (property == 'scary-monster') node.scaryMonster = newValue;
203 } 203 }
204 } 204 }
205 205
206 206
207 /** 207 /**
208 * Demonstrates a custom element can override attributes []= and remove. 208 * Demonstrates a custom element can override attributes []= and remove.
209 * and see changes that the data binding system is making to the attributes. 209 * and see changes that the data binding system is making to the attributes.
210 */ 210 */
211 class WithAttrsCustomElement extends HtmlElement { 211 class WithAttrsCustomElement extends HtmlElement {
212 AttributeMapWrapper<String, String> _attributes; 212 AttributeMapWrapper _attributes;
213 213
214 factory WithAttrsCustomElement() => 214 factory WithAttrsCustomElement() =>
215 new Element.tag('with-attrs-custom-element'); 215 new Element.tag('with-attrs-custom-element');
216 216
217 WithAttrsCustomElement.created() : super.created() { 217 WithAttrsCustomElement.created() : super.created() {
218 _attributes = new AttributeMapWrapper(super.attributes); 218 _attributes = new AttributeMapWrapper(super.attributes);
219 } 219 }
220 220
221 get attributes => _attributes; 221 get attributes => _attributes;
222 } 222 }
(...skipping 23 matching lines...) Expand all
246 246
247 void addAll(Map<K, V> other) => _map.addAll(other); 247 void addAll(Map<K, V> other) => _map.addAll(other);
248 void clear() => _map.clear(); 248 void clear() => _map.clear();
249 void forEach(void f(K key, V value)) => _map.forEach(f); 249 void forEach(void f(K key, V value)) => _map.forEach(f);
250 Iterable<K> get keys => _map.keys; 250 Iterable<K> get keys => _map.keys;
251 Iterable<V> get values => _map.values; 251 Iterable<V> get values => _map.values;
252 int get length => _map.length; 252 int get length => _map.length;
253 bool get isEmpty => _map.isEmpty; 253 bool get isEmpty => _map.isEmpty;
254 bool get isNotEmpty => _map.isNotEmpty; 254 bool get isNotEmpty => _map.isNotEmpty;
255 } 255 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698