| 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 template_binding.test.utils; | 5 library template_binding.test.utils; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:html'; | 8 import 'dart:html'; |
| 9 import 'package:observe/observe.dart'; | 9 import 'package:observe/observe.dart'; |
| 10 |
| 11 // Note: tests that import 'utils.dart' rely on the following line to make test |
| 12 // smaller for dart2js and prevent timeouts in the test bots. |
| 13 import 'package:observe/mirrors_used.dart'; |
| 10 import 'package:template_binding/template_binding.dart'; | 14 import 'package:template_binding/template_binding.dart'; |
| 11 export 'package:observe/src/dirty_check.dart' show dirtyCheckZone; | 15 export 'package:observe/src/dirty_check.dart' show dirtyCheckZone; |
| 12 | 16 |
| 13 /// A small method to help readability. Used to cause the next "then" in a chain | 17 /// A small method to help readability. Used to cause the next "then" in a chain |
| 14 /// to happen in the next microtask: | 18 /// to happen in the next microtask: |
| 15 /// | 19 /// |
| 16 /// future.then(endOfMicrotask).then(...) | 20 /// future.then(endOfMicrotask).then(...) |
| 17 endOfMicrotask(_) => new Future.value(); | 21 endOfMicrotask(_) => new Future.value(); |
| 18 | 22 |
| 19 /// A small method to help readability. Used to cause the next "then" in a chain | 23 /// A small method to help readability. Used to cause the next "then" in a chain |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 class NullTreeSanitizer implements NodeTreeSanitizer { | 104 class NullTreeSanitizer implements NodeTreeSanitizer { |
| 101 void sanitizeTree(Node node) {} | 105 void sanitizeTree(Node node) {} |
| 102 } | 106 } |
| 103 | 107 |
| 104 unbindAll(node) { | 108 unbindAll(node) { |
| 105 nodeBind(node).unbindAll(); | 109 nodeBind(node).unbindAll(); |
| 106 for (var child = node.firstChild; child != null; child = child.nextNode) { | 110 for (var child = node.firstChild; child != null; child = child.nextNode) { |
| 107 unbindAll(child); | 111 unbindAll(child); |
| 108 } | 112 } |
| 109 } | 113 } |
| OLD | NEW |