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

Unified Diff: samples/third_party/todomvc/test/utils.dart

Issue 132403010: big update to observe, template_binding, polymer (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/template_binding/test/utils.dart ('k') | tools/line_doc_comments.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/third_party/todomvc/test/utils.dart
diff --git a/samples/third_party/todomvc/test/utils.dart b/samples/third_party/todomvc/test/utils.dart
index 196ca1eac35b46e4956127b35222322f1c0ba099..3dafe562dc661b449b93d5a54c66228fbc1f93bc 100644
--- a/samples/third_party/todomvc/test/utils.dart
+++ b/samples/third_party/todomvc/test/utils.dart
@@ -12,11 +12,10 @@ Future onPropertyInit(Observable obj, String path) {
if (obs.value != null) return new Future.value(obs.value);
final c = new Completer();
- StreamSubscription sub;
- sub = obs.changes.listen((_) {
- if (obs.value != null) {
- sub.cancel();
- c.complete(obs.value);
+ obs.open((value) {
+ if (value != null) {
+ obs.close();
+ c.complete(value);
}
});
return c.future;
« no previous file with comments | « pkg/template_binding/test/utils.dart ('k') | tools/line_doc_comments.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698