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

Unified Diff: pkg/polymer_expressions/test/bindings_test.dart

Issue 263833027: Fix two-way binding in polymer expressions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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/polymer_expressions/lib/polymer_expressions.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer_expressions/test/bindings_test.dart
diff --git a/pkg/polymer_expressions/test/bindings_test.dart b/pkg/polymer_expressions/test/bindings_test.dart
index 957b3582873fefcd9ef9a9bc24a2552a67867cbe..c8d1194664c47f74d77ae06f539d996c46f7f817 100644
--- a/pkg/polymer_expressions/test/bindings_test.dart
+++ b/pkg/polymer_expressions/test/bindings_test.dart
@@ -82,8 +82,9 @@ main() => dirtyCheckZone().run(() {
'<template><input id="i1" value={{x}}></template>'));
testDiv.append(template.createInstance(model, new PolymerExpressions()));
+ var el;
return new Future(() {
- var el = testDiv.query("#i1");
+ el = testDiv.query("#i1");
var subscription = el.onInput.listen(expectAsync((_) {}, count: 1));
el.focus();
@@ -113,8 +114,10 @@ main() => dirtyCheckZone().run(() {
// selection will be preserved.
expect(el.selectionStart, 4);
expect(el.selectionEnd, 4);
-
subscription.cancel();
+ }).then(_nextMicrotask).then((_) {
Jennifer Messerly 2014/05/07 19:30:46 fyi -- I wonder if we should use requestAnimationF
Siggi Cherem (dart-lang) 2014/05/07 19:58:15 Good idea. PTAL
+ expect(el.selectionStart, 4);
+ expect(el.selectionEnd, 4);
});
});
« no previous file with comments | « pkg/polymer_expressions/lib/polymer_expressions.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698