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

Unified Diff: test/data/input/text_tostring_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
« no previous file with comments | « test/data/input/text_top_level_test.html ('k') | test/data/input/todomvc_listorder_shadowdom_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/data/input/text_tostring_test.html
diff --git a/test/data/input/text_tostring_test.html b/test/data/input/text_tostring_test.html
index 8d429d5231c4a6cc717530cbc0530111a0bb71d2..bd930c474b8fc434724ba3eb41aa6ab52162b50a 100644
--- a/test/data/input/text_tostring_test.html
+++ b/test/data/input/text_tostring_test.html
@@ -8,7 +8,6 @@ BSD-style license that can be found in the LICENSE file.
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <title>watch_global_var_test</title>
<script type='application/javascript' src="testing.js"></script>
</head>
<body>
@@ -18,10 +17,14 @@ 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';
+
+ @observable
+ List list = toObservable(['initial', 'list state']);
+
+ @observable
+ Map map = toObservable({'initial': 'map', 'state': '!'});
- List list = ['initial', 'list state'];
- Map map = {'initial': 'map', 'state': '!'};
final expected = query('#expected');
final actual = query('#actual');
@@ -35,11 +38,11 @@ BSD-style license that can be found in the LICENSE file.
map.clear();
map['lazy'] = 'dog';
- dispatch();
+ deliverChangesSync();
expect(actual.innerHtml, expected.innerHtml);
- window.setTimeout(() => window.postMessage('done', '*'), 0);
+ window.setImmediate(() => window.postMessage('done', '*'));
}, 0);
}
</script>
« no previous file with comments | « test/data/input/text_top_level_test.html ('k') | test/data/input/todomvc_listorder_shadowdom_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698