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

Unified Diff: test/data/input/todomvc_listorder_shadowdom_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_tostring_test.html ('k') | test/data/input/todomvc_listorder_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/data/input/todomvc_listorder_shadowdom_test.html
diff --git a/test/data/input/todomvc_listorder_shadowdom_test.html b/test/data/input/todomvc_listorder_shadowdom_test.html
index 1ed1bc5f982a1c1df5b048ca1b407ae34cacbac2..8d8f3c4c4def37b76a18015a09d2d1ff6f3bf2e9 100644
--- a/test/data/input/todomvc_listorder_shadowdom_test.html
+++ b/test/data/input/todomvc_listorder_shadowdom_test.html
@@ -73,6 +73,7 @@ BSD-style license that can be found in the LICENSE file.
import 'dart:html';
import 'package:unittest/unittest.dart';
import 'package:web_ui/web_ui.dart';
+import 'package:web_ui/observe/html.dart';
import 'example/todomvc/main.dart' as todomvc_main;
import 'example/todomvc/model.dart';
@@ -86,21 +87,22 @@ main() {
app.todos.add(new Todo('one (unchecked)'));
app.todos.add(new Todo('two (checked)')..done = true);
app.todos.add(new Todo('three (unchecked)'));
- viewModel.showIncomplete = true;
- viewModel.showDone = true;
- dispatch();
+ locationHash = '#/';
- window.setTimeout(() {
- viewModel.showIncomplete = true;
- viewModel.showDone = false;
- dispatch();
- window.setTimeout(() {
- viewModel.showIncomplete = true;
- viewModel.showDone = true;
- dispatch();
- window.setTimeout(() => window.postMessage('done', '*'), 0);
- }, 0);
- }, 0);
+ deliverChangesSync();
+ expect(queryAll('#todo-list x-todo-row').length, 3);
+
+ locationHash = '#/active';
+ deliverChangesSync();
+ expect(queryAll('#todo-list x-todo-row').length, 2);
+
+ locationHash = '#/completed';
+ deliverChangesSync();
+ expect(queryAll('#todo-list x-todo-row').length, 1);
+
+ locationHash = '#/';
+ deliverChangesSync();
+ window.postMessage('done', '*');
}, 0);
}
</script>
« no previous file with comments | « test/data/input/text_tostring_test.html ('k') | test/data/input/todomvc_listorder_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698