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

Side by Side Diff: pkg/polymer/test/auto_binding_test.dart

Issue 420673002: Roll polymer packages to version 0.3.4 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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/polymer/pubspec.yaml ('k') | pkg/polymer/test/bind_properties_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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:html'; 6 import 'dart:html';
7 import 'package:polymer/auto_binding.dart'; 7 import 'package:polymer/auto_binding.dart';
8 import 'package:polymer/polymer.dart'; 8 import 'package:polymer/polymer.dart';
9 import 'package:unittest/unittest.dart'; 9 import 'package:unittest/unittest.dart';
10 import 'package:unittest/html_config.dart'; 10 import 'package:unittest/html_config.dart';
(...skipping 21 matching lines...) Expand all
32 if (e.target.id == 'one') { 32 if (e.target.id == 'one') {
33 expect(e.target, template); 33 expect(e.target, template);
34 34
35 var t = template; 35 var t = template;
36 var h = t.$['h']; 36 var h = t.$['h'];
37 expect(h.text, t.model.greeting, reason: 'binding applied'); 37 expect(h.text, t.model.greeting, reason: 'binding applied');
38 var ce = t.fire('tap', onNode: h, detail: []); 38 var ce = t.fire('tap', onNode: h, detail: []);
39 expect(ce.detail, ['handled'], reason: 'element event handler fired'); 39 expect(ce.detail, ['handled'], reason: 'element event handler fired');
40 } 40 }
41 41
42 if (events == 2) completer.complete(); 42 if (events == 3) completer.complete();
43 });
44
45 /// test dynamic creation
46 new Future(() {
47 var d = new DivElement();
48 d.setInnerHtml('<template is="auto-binding">Dynamical'
49 ' <input value="{{value}}"><div>{{value}}</div></template>',
50 treeSanitizer: new _NullSanitizer());
51 document.body.append(d);
43 }); 52 });
44 53
45 return completer.future; 54 return completer.future;
46 }); 55 });
47 }); 56 });
57
58 class _NullSanitizer implements NodeTreeSanitizer {
59 sanitizeTree(Node node) {}
60 }
OLDNEW
« no previous file with comments | « pkg/polymer/pubspec.yaml ('k') | pkg/polymer/test/bind_properties_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698