| OLD | NEW |
| 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_observe/mdv_observe.dart'; | 9 import 'package:mdv/mdv.dart' as mdv; |
| 10 import 'package:observe/observe.dart'; |
| 10 import 'package:unittest/html_config.dart'; | 11 import 'package:unittest/html_config.dart'; |
| 11 import 'package:unittest/unittest.dart'; | 12 import 'package:unittest/unittest.dart'; |
| 12 import 'mdv_observe_utils.dart'; | 13 import 'observe_utils.dart'; |
| 13 | 14 |
| 14 // Note: this file ported from | 15 // Note: this file ported from |
| 15 // https://github.com/toolkitchen/mdv/blob/master/tests/node_bindings.js | 16 // https://github.com/toolkitchen/mdv/blob/master/tests/node_bindings.js |
| 16 | 17 |
| 17 main() { | 18 main() { |
| 19 mdv.initialize(); |
| 18 useHtmlConfiguration(); | 20 useHtmlConfiguration(); |
| 19 group('Node Bindings', nodeBindingTests); | 21 group('Node Bindings', nodeBindingTests); |
| 20 } | 22 } |
| 21 | 23 |
| 22 sym(x) => new Symbol(x); | 24 sym(x) => new Symbol(x); |
| 23 | 25 |
| 24 nodeBindingTests() { | 26 nodeBindingTests() { |
| 25 var testDiv; | 27 var testDiv; |
| 26 | 28 |
| 27 setUp(() { | 29 setUp(() { |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 expect(input.checked, false); | 149 expect(input.checked, false); |
| 148 | 150 |
| 149 input.click(); | 151 input.click(); |
| 150 expect(model[sym('x')], true); | 152 expect(model[sym('x')], true); |
| 151 deliverChangeRecords(); | 153 deliverChangeRecords(); |
| 152 | 154 |
| 153 input.click(); | 155 input.click(); |
| 154 expect(model[sym('x')], false); | 156 expect(model[sym('x')], false); |
| 155 }); | 157 }); |
| 156 } | 158 } |
| OLD | NEW |