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

Side by Side Diff: pkg/mdv/test/element_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/binding_syntax_test.dart ('k') | pkg/mdv/test/mdv_test_utils.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 19 matching lines...) Expand all
30 30
31 setUp(() { 31 setUp(() {
32 document.body.append(testDiv = new DivElement()); 32 document.body.append(testDiv = new DivElement());
33 }); 33 });
34 34
35 tearDown(() { 35 tearDown(() {
36 testDiv.remove(); 36 testDiv.remove();
37 testDiv = null; 37 testDiv = null;
38 }); 38 });
39 39
40 dispatchEvent(type, target) {
41 target.dispatchEvent(new Event(type, cancelable: false));
42 }
43
44 observeTest('Text', () { 40 observeTest('Text', () {
45 var template = new Element.html('<template bind>{{a}} and {{b}}'); 41 var template = new Element.html('<template bind>{{a}} and {{b}}');
46 testDiv.append(template); 42 testDiv.append(template);
47 var model = toSymbolMap({'a': 1, 'b': 2}); 43 var model = toSymbolMap({'a': 1, 'b': 2});
48 template.model = model; 44 template.model = model;
49 performMicrotaskCheckpoint(); 45 performMicrotaskCheckpoint();
50 var text = testDiv.nodes[1]; 46 var text = testDiv.nodes[1];
51 expect(text.text, '1 and 2'); 47 expect(text.text, '1 and 2');
52 48
53 model[sym('a')] = 3; 49 model[sym('a')] = 3;
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 394
399 var model = toSymbolMap({'foo': 'bar'}); 395 var model = toSymbolMap({'foo': 'bar'});
400 el.attributes['foo'] = '{{foo}} {{foo}}'; 396 el.attributes['foo'] = '{{foo}} {{foo}}';
401 template.model = model; 397 template.model = model;
402 398
403 performMicrotaskCheckpoint(); 399 performMicrotaskCheckpoint();
404 el = testDiv.nodes[1]; 400 el = testDiv.nodes[1];
405 expect(el.attributes['foo'], 'bar bar'); 401 expect(el.attributes['foo'], 'bar bar');
406 }); 402 });
407 } 403 }
OLDNEW
« no previous file with comments | « pkg/mdv/test/binding_syntax_test.dart ('k') | pkg/mdv/test/mdv_test_utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698