| 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 62fb8ee24e12b6a33f514301973d54c73cffb19b..fb2b8ba5b000bbd25b7f7855ffa6b317cf4580a1 100644
|
| --- a/pkg/template_binding/test/custom_element_bindings_test.dart
|
| +++ b/pkg/template_binding/test/custom_element_bindings_test.dart
|
| @@ -6,6 +6,7 @@ library template_binding.test.custom_element_bindings_test;
|
|
|
| import 'dart:async';
|
| import 'dart:html';
|
| +import 'dart:collection' show MapView;
|
| import 'package:template_binding/template_binding.dart';
|
| import 'package:observe/observe.dart';
|
| import 'package:unittest/html_config.dart';
|
| @@ -215,34 +216,18 @@ class WithAttrsCustomElement extends HtmlElement {
|
| }
|
|
|
| // TODO(jmesserly): would be nice to use mocks when mirrors work on dart2js.
|
| -class AttributeMapWrapper<K, V> implements Map<K, V> {
|
| +class AttributeMapWrapper<K, V> extends MapView<K, V> {
|
| final List log = [];
|
| - Map<K, V> _map;
|
|
|
| - AttributeMapWrapper(this._map);
|
| -
|
| - bool containsValue(Object value) => _map.containsValue(value);
|
| - bool containsKey(Object key) => _map.containsKey(key);
|
| - V operator [](Object key) => _map[key];
|
| + AttributeMapWrapper(Map map) : super(map);
|
|
|
| void operator []=(K key, V value) {
|
| log.add(['[]=', key, value]);
|
| - _map[key] = value;
|
| + super[key] = value;
|
| }
|
|
|
| - V putIfAbsent(K key, V ifAbsent()) => _map.putIfAbsent(key, ifAbsent);
|
| -
|
| V remove(Object key) {
|
| log.add(['remove', key]);
|
| - _map.remove(key);
|
| + super.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;
|
| }
|
|
|