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

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

Issue 18255003: [package:mdv] fix error from dartanalyzer (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « no previous file | no next file » | 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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 var model = toSymbolMap({'a': {'b': false}}); 365 var model = toSymbolMap({'a': {'b': false}});
366 input.bind('checked', model, 'a.b'); 366 input.bind('checked', model, 'a.b');
367 367
368 input.click(); 368 input.click();
369 expect(model[sym('a')][sym('b')], true); 369 expect(model[sym('a')][sym('b')], true);
370 370
371 input.click(); 371 input.click();
372 expect(model[sym('a')][sym('b')], false); 372 expect(model[sym('a')][sym('b')], false);
373 }); 373 });
374 374
375 test('Select selectedIndex', function() { 375 test('Select selectedIndex', () {
376 var select = new SelectElement(); 376 var select = new SelectElement();
377 testDiv.append(select); 377 testDiv.append(select);
378 var option0 = select.append(new OptionElement()); 378 var option0 = select.append(new OptionElement());
379 var option1 = select.append(new OptionElement()); 379 var option1 = select.append(new OptionElement());
380 var option2 = select.append(new OptionElement()); 380 var option2 = select.append(new OptionElement());
381 381
382 var model = toSymbolMap({'val': 2}); 382 var model = toSymbolMap({'val': 2});
383 383
384 select.bind('selectedIndex', model, 'val'); 384 select.bind('selectedIndex', model, 'val');
385 deliverChangeRecords(); 385 deliverChangeRecords();
(...skipping 12 matching lines...) Expand all
398 398
399 var model = toSymbolMap({'foo': 'bar'}); 399 var model = toSymbolMap({'foo': 'bar'});
400 el.attributes['foo'] = '{{foo}} {{foo}}'; 400 el.attributes['foo'] = '{{foo}} {{foo}}';
401 template.model = model; 401 template.model = model;
402 402
403 deliverChangeRecords(); 403 deliverChangeRecords();
404 el = testDiv.nodes[1]; 404 el = testDiv.nodes[1];
405 expect(el.attributes['foo'], 'bar bar'); 405 expect(el.attributes['foo'], 'bar bar');
406 }); 406 });
407 } 407 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698