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

Unified Diff: test/data/input/mix_iterate_if_test.html

Issue 12225039: Support for observable models, fixes #259 (Closed) Base URL: https://github.com/dart-lang/web-ui.git@master
Patch Set: Created 7 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
Index: test/data/input/mix_iterate_if_test.html
diff --git a/test/data/input/mix_iterate_if_test.html b/test/data/input/mix_iterate_if_test.html
index aae98e734b8e96d1895de3c26ec7a7bc3aece6ee..c491360fbc39ba491a5ef7efae6be62e8d9ca50d 100644
--- a/test/data/input/mix_iterate_if_test.html
+++ b/test/data/input/mix_iterate_if_test.html
@@ -21,13 +21,16 @@ BSD-style license that can be found in the LICENSE file.
<script type="application/dart">
import 'dart:html';
import 'package:unittest/unittest.dart';
- import 'package:web_ui/watcher.dart';
+ import 'package:web_ui/observe.dart';
- List<List> table = [[1, 2, 3], [4, 0, 5], [0, 2, 4]];
+ _obs(list) => new ObservableList.from(list);
+
+ @observable
+ List<List> table = _obs([_obs([1, 2, 3]), _obs([4, 0, 5]), _obs([0, 2, 4])]);
main() {
window.setTimeout(() {
table[1][1] = 9;
- dispatch();
+ deliverChangesSync();
window.setTimeout(() {
var test = document.query('#test');
expect(test.children.length, table.length);
@@ -47,7 +50,7 @@ BSD-style license that can be found in the LICENSE file.
expect(td.innerHtml, value.toString());
}
}
- window.setTimeout(() => window.postMessage('done', '*'), 0);
+ window.setImmediate(() => window.postMessage('done', '*'));
}, 0);
}, 0);
}

Powered by Google App Engine
This is Rietveld 408576698