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

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

Issue 22284003: pkg: analysis aided cleanup (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: nits Created 7 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/mdv/lib/mdv.dart ('k') | pkg/mdv/test/custom_element_bindings_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 binding_syntax_test; 5 library binding_syntax_test;
6 6
7 import 'dart:async';
8 import 'dart:collection'; 7 import 'dart:collection';
9 import 'dart:html'; 8 import 'dart:html';
10 import 'package:mdv/mdv.dart' as mdv; 9 import 'package:mdv/mdv.dart' as mdv;
11 import 'package:observe/observe.dart'; 10 import 'package:observe/observe.dart';
12 import 'package:unittest/html_config.dart'; 11 import 'package:unittest/html_config.dart';
13 import 'package:unittest/unittest.dart'; 12 import 'package:unittest/unittest.dart';
14 import 'mdv_test_utils.dart'; 13 import 'mdv_test_utils.dart';
15 14
16 // Note: this file ported from 15 // Note: this file ported from
17 // https://github.com/toolkitchen/mdv/blob/master/tests/syntax.js 16 // https://github.com/toolkitchen/mdv/blob/master/tests/syntax.js
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 class TimesTwoSyntax extends BindingDelegate { 193 class TimesTwoSyntax extends BindingDelegate {
195 getBinding(model, path, name, node) { 194 getBinding(model, path, name, node) {
196 path = path.trim(); 195 path = path.trim();
197 if (!path.startsWith('2x:')) return null; 196 if (!path.startsWith('2x:')) return null;
198 197
199 path = path.substring(3); 198 path = path.substring(3);
200 return new CompoundBinding((values) => values['value'] * 2) 199 return new CompoundBinding((values) => values['value'] * 2)
201 ..bind('value', model, path); 200 ..bind('value', model, path);
202 } 201 }
203 } 202 }
OLDNEW
« no previous file with comments | « pkg/mdv/lib/mdv.dart ('k') | pkg/mdv/test/custom_element_bindings_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698