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

Unified Diff: example/todomvc/test/todomvc_listorder_test.html

Issue 22962005: Merge pull request #581 from kevmoo/polymer (Closed) Base URL: https://github.com/dart-lang/web-ui.git@polymer
Patch Set: Created 7 years, 4 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 | « example/todomvc/test/test.dart ('k') | example/todomvc/test/todomvc_mainpage2_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: example/todomvc/test/todomvc_listorder_test.html
diff --git a/example/todomvc/test/todomvc_listorder_test.html b/example/todomvc/test/todomvc_listorder_test.html
index bd3920615ab9a52ce73bdc6e87ee1120b8b18c95..6d9c49d62beb054f25f3d082e772350a7b2e8a61 100644
--- a/example/todomvc/test/todomvc_listorder_test.html
+++ b/example/todomvc/test/todomvc_listorder_test.html
@@ -24,45 +24,34 @@ wrong order when using lists and ifs together.
<body>
<todo-app></todo-app>
<script type="application/dart">
-import 'dart:async';
import 'dart:html';
-import 'package:mdv/mdv.dart' as mdv;
-import 'package:observe/observe.dart';
-import 'package:unittest/unittest.dart';
import 'package:polymer/polymer.dart';
+import 'package:unittest/unittest.dart';
import '../web/model.dart';
main() {
- mdv.initialize();
+ appModel.todos.add(new Todo('one (unchecked)'));
+ appModel.todos.add(new Todo('two (checked)')..done = true);
+ appModel.todos.add(new Todo('three (unchecked)'));
- Timer.run(() {
- appModel.todos.add(new Todo('one (unchecked)'));
- appModel.todos.add(new Todo('two (checked)')..done = true);
- appModel.todos.add(new Todo('three (unchecked)'));
+ var root = query('span[is=todo-app]').xtag.shadowRoot;
- var root = query('span[is=todo-app]').xtag.shadowRoot;
+ windowLocation.hash = '#/';
+ performMicrotaskCheckpoint();
- windowLocation.hash = '#/';
- Timer.run(() {
- expect(root.queryAll('#todo-list li[is=todo-row]').length, 3);
+ expect(root.queryAll('#todo-list li[is=todo-row]').length, 3);
+ windowLocation.hash = '#/active';
+ performMicrotaskCheckpoint();
- windowLocation.hash = '#/active';
- Timer.run(() {
- expect(root.queryAll('#todo-list li[is=todo-row]').length, 2);
+ expect(root.queryAll('#todo-list li[is=todo-row]').length, 2);
+ windowLocation.hash = '#/completed';
+ performMicrotaskCheckpoint();
- windowLocation.hash = '#/completed';
- Timer.run(() {
- expect(root.queryAll('#todo-list li[is=todo-row]').length, 1);
+ expect(root.queryAll('#todo-list li[is=todo-row]').length, 1);
+ windowLocation.hash = '#/';
+ performMicrotaskCheckpoint();
- windowLocation.hash = '#/';
- // TODO(sigmund): investigate why is not enough to do Timer.run
- new Timer(new Duration(milliseconds: 200), () {
- window.postMessage('done', '*');
- });
- });
- });
- });
- });
+ window.postMessage('done', '*');
}
</script>
</body>
« no previous file with comments | « example/todomvc/test/test.dart ('k') | example/todomvc/test/todomvc_mainpage2_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698