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

Side by Side Diff: pkg/mdv/test/node_bindings_test.dart

Issue 19663011: Custom Syntax's are now enabled via template.bindingDelegate = (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: restore @Experimental Created 7 years, 5 months 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 | « pkg/mdv/test/mdv_test_utils.dart ('k') | pkg/mdv/test/template_element_test.dart » ('j') | 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 node_bindings_test; 5 library node_bindings_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:html'; 8 import 'dart:html';
9 import 'package:mdv/mdv.dart' as mdv; 9 import 'package:mdv/mdv.dart' as mdv;
10 import 'package:observe/observe.dart'; 10 import 'package:observe/observe.dart';
(...skipping 17 matching lines...) Expand all
28 28
29 setUp(() { 29 setUp(() {
30 document.body.append(testDiv = new DivElement()); 30 document.body.append(testDiv = new DivElement());
31 }); 31 });
32 32
33 tearDown(() { 33 tearDown(() {
34 testDiv.remove(); 34 testDiv.remove();
35 testDiv = null; 35 testDiv = null;
36 }); 36 });
37 37
38 dispatchEvent(type, target) {
39 target.dispatchEvent(new Event(type, cancelable: false));
40 }
41
42 observeTest('Text', () { 38 observeTest('Text', () {
43 var text = new Text('hi'); 39 var text = new Text('hi');
44 var model = toSymbolMap({'a': 1}); 40 var model = toSymbolMap({'a': 1});
45 text.bind('text', model, 'a'); 41 text.bind('text', model, 'a');
46 expect(text.text, '1'); 42 expect(text.text, '1');
47 43
48 model[sym('a')] = 2; 44 model[sym('a')] = 2;
49 performMicrotaskCheckpoint(); 45 performMicrotaskCheckpoint();
50 expect(text.text, '2'); 46 expect(text.text, '2');
51 47
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 expect(input.checked, false); 149 expect(input.checked, false);
154 150
155 input.click(); 151 input.click();
156 expect(model[sym('x')], true); 152 expect(model[sym('x')], true);
157 performMicrotaskCheckpoint(); 153 performMicrotaskCheckpoint();
158 154
159 input.click(); 155 input.click();
160 expect(model[sym('x')], false); 156 expect(model[sym('x')], false);
161 }); 157 });
162 } 158 }
OLDNEW
« no previous file with comments | « pkg/mdv/test/mdv_test_utils.dart ('k') | pkg/mdv/test/template_element_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698