| 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 library custom_element_bindings_test; | 5 library 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:mdv_observe/mdv_observe.dart'; | 9 import 'package:mdv_observe/mdv_observe.dart'; |
| 10 import 'package:unittest/html_config.dart'; | 10 import 'package:unittest/html_config.dart'; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 document.body.append(testDiv = new DivElement()); | 25 document.body.append(testDiv = new DivElement()); |
| 26 }); | 26 }); |
| 27 | 27 |
| 28 tearDown(() { | 28 tearDown(() { |
| 29 testDiv.remove(); | 29 testDiv.remove(); |
| 30 testDiv = null; | 30 testDiv = null; |
| 31 }); | 31 }); |
| 32 | 32 |
| 33 createTestHtml(s) { | 33 createTestHtml(s) { |
| 34 var div = new DivElement(); | 34 var div = new DivElement(); |
| 35 div.innerHtml = s; | 35 /*div.setInnerHtml(s, |
| 36 validator: new NodeValidatorBuilder.common() |
| 37 ..allowCustomElement('my-custom-element', attributes: ['*'])); |
| 38 */ |
| 39 //div.setInnerHtml(s, treeSanitizer: new NullTreeSanitizer()); |
| 40 div.$dom_innerHtml = s; |
| 36 testDiv.append(div); | 41 testDiv.append(div); |
| 37 | 42 |
| 38 for (var node in div.queryAll('*')) { | 43 for (var node in div.queryAll('*')) { |
| 39 if (node.isTemplate) TemplateElement.decorate(node); | 44 if (node.isTemplate) TemplateElement.decorate(node); |
| 40 } | 45 } |
| 41 | 46 |
| 42 return div; | 47 return div; |
| 43 } | 48 } |
| 44 | 49 |
| 45 | 50 |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 } | 283 } |
| 279 | 284 |
| 280 void clear() => _map.clear(); | 285 void clear() => _map.clear(); |
| 281 void forEach(void f(K key, V value)) => _map.forEach(f); | 286 void forEach(void f(K key, V value)) => _map.forEach(f); |
| 282 Iterable<K> get keys => _map.keys; | 287 Iterable<K> get keys => _map.keys; |
| 283 Iterable<V> get values => _map.values; | 288 Iterable<V> get values => _map.values; |
| 284 int get length => _map.length; | 289 int get length => _map.length; |
| 285 bool get isEmpty => _map.isEmpty; | 290 bool get isEmpty => _map.isEmpty; |
| 286 bool get isNotEmpty => _map.isNotEmpty; | 291 bool get isNotEmpty => _map.isNotEmpty; |
| 287 } | 292 } |
| OLD | NEW |