Index: pkg/template_binding/test/custom_element_bindings_test.dart |
diff --git a/pkg/template_binding/test/custom_element_bindings_test.dart b/pkg/template_binding/test/custom_element_bindings_test.dart |
index d015825592fc8a17b888960e7cb378558e0a17c2..62fb8ee24e12b6a33f514301973d54c73cffb19b 100644 |
--- a/pkg/template_binding/test/custom_element_bindings_test.dart |
+++ b/pkg/template_binding/test/custom_element_bindings_test.dart |
@@ -215,18 +215,34 @@ class WithAttrsCustomElement extends HtmlElement { |
} |
// TODO(jmesserly): would be nice to use mocks when mirrors work on dart2js. |
-class AttributeMapWrapper<K, V> extends MapView<K, V> { |
+class AttributeMapWrapper<K, V> implements Map<K, V> { |
final List log = []; |
+ Map<K, V> _map; |
- AttributeMapWrapper(Map map) : super(map); |
+ AttributeMapWrapper(this._map); |
+ |
+ bool containsValue(Object value) => _map.containsValue(value); |
+ bool containsKey(Object key) => _map.containsKey(key); |
+ V operator [](Object key) => _map[key]; |
void operator []=(K key, V value) { |
log.add(['[]=', key, value]); |
- super[key] = value; |
+ _map[key] = value; |
} |
+ V putIfAbsent(K key, V ifAbsent()) => _map.putIfAbsent(key, ifAbsent); |
+ |
V remove(Object key) { |
log.add(['remove', key]); |
- super.remove(key); |
+ _map.remove(key); |
} |
+ |
+ void addAll(Map<K, V> other) => _map.addAll(other); |
+ void clear() => _map.clear(); |
+ void forEach(void f(K key, V value)) => _map.forEach(f); |
+ Iterable<K> get keys => _map.keys; |
+ Iterable<V> get values => _map.values; |
+ int get length => _map.length; |
+ bool get isEmpty => _map.isEmpty; |
+ bool get isNotEmpty => _map.isNotEmpty; |
} |