Index: pkg/mdv/test/node_bindings_test.dart |
diff --git a/pkg/mdv/test/node_bindings_test.dart b/pkg/mdv/test/node_bindings_test.dart |
index 2609d9ce066c21f4f766c3077e4ee1411dc00048..c13e5881409ee2aabe12e7d421213238461b4ffc 100644 |
--- a/pkg/mdv/test/node_bindings_test.dart |
+++ b/pkg/mdv/test/node_bindings_test.dart |
@@ -19,8 +19,6 @@ main() { |
group('Node Bindings', nodeBindingTests); |
} |
-sym(x) => new Symbol(x); |
- |
nodeBindingTests() { |
var testDiv; |
@@ -39,12 +37,12 @@ nodeBindingTests() { |
text.bind('text', model, 'a'); |
expect(text.text, '1'); |
- model[sym('a')] = 2; |
+ model[#a] = 2; |
performMicrotaskCheckpoint(); |
expect(text.text, '2'); |
text.unbind('text'); |
- model[sym('a')] = 3; |
+ model[#a] = 3; |
performMicrotaskCheckpoint(); |
expect(text.text, '2'); |
@@ -61,17 +59,17 @@ nodeBindingTests() { |
expect(element.attributes['hidden'], ''); |
expect(element.id, '2'); |
- model[sym('a')] = null; |
+ model[#a] = null; |
performMicrotaskCheckpoint(); |
expect(element.attributes, isNot(contains('hidden')), |
reason: 'null is false-y'); |
- model[sym('a')] = false; |
+ model[#a] = false; |
performMicrotaskCheckpoint(); |
expect(element.attributes, isNot(contains('hidden'))); |
- model[sym('a')] = 'foo'; |
- model[sym('b')] = 'x'; |
+ model[#a] = 'foo'; |
+ model[#b] = 'x'; |
performMicrotaskCheckpoint(); |
expect(element.attributes, contains('hidden')); |
expect(element.attributes['hidden'], ''); |
@@ -85,23 +83,23 @@ nodeBindingTests() { |
el.bind('value', model, 'x'); |
expect(el.value, '42'); |
- model[sym('x')] = 'Hi'; |
+ model[#x] = 'Hi'; |
expect(el.value, '42', reason: 'changes delivered async'); |
performMicrotaskCheckpoint(); |
expect(el.value, 'Hi'); |
el.value = 'changed'; |
dispatchEvent('input', el); |
- expect(model[sym('x')], 'changed'); |
+ expect(model[#x], 'changed'); |
el.unbind('value'); |
el.value = 'changed again'; |
dispatchEvent('input', el); |
- expect(model[sym('x')], 'changed'); |
+ expect(model[#x], 'changed'); |
el.bind('value', model, 'x'); |
- model[sym('x')] = null; |
+ model[#x] = null; |
performMicrotaskCheckpoint(); |
expect(el.value, ''); |
} |
@@ -116,20 +114,20 @@ nodeBindingTests() { |
input.bind('checked', model, 'x'); |
expect(input.checked, true); |
- model[sym('x')] = false; |
+ model[#x] = false; |
expect(input.checked, true); |
performMicrotaskCheckpoint(); |
expect(input.checked, false,reason: 'model change should update checked'); |
input.checked = true; |
dispatchEvent('change', input); |
- expect(model[sym('x')], true, reason: 'input.checked should set model'); |
+ expect(model[#x], true, reason: 'input.checked should set model'); |
input.unbind('checked'); |
input.checked = false; |
dispatchEvent('change', input); |
- expect(model[sym('x')], true, |
+ expect(model[#x], true, |
reason: 'disconnected binding should not fire'); |
}); |
@@ -141,16 +139,16 @@ nodeBindingTests() { |
input.bind('checked', model, 'x'); |
expect(input.checked, true); |
- model[sym('x')] = false; |
+ model[#x] = false; |
expect(input.checked, true, reason: 'changes delivered async'); |
performMicrotaskCheckpoint(); |
expect(input.checked, false); |
input.click(); |
- expect(model[sym('x')], true); |
+ expect(model[#x], true); |
performMicrotaskCheckpoint(); |
input.click(); |
- expect(model[sym('x')], false); |
+ expect(model[#x], false); |
}); |
} |