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

Unified Diff: samples/third_party/todomvc/test/listorder_test.dart

Issue 41293002: Fixes from polymer.dart API review (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Made Job a part of polymer Created 7 years, 2 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/test/unbind_test.dart ('k') | samples/third_party/todomvc/test/markdone_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/third_party/todomvc/test/listorder_test.dart
diff --git a/samples/third_party/todomvc/test/listorder_test.dart b/samples/third_party/todomvc/test/listorder_test.dart
index 472d8eafe8cf36d006995faef50677ff492d39f3..a697be4522bfd87b686c51fe94a1133c7ac2835b 100644
--- a/samples/third_party/todomvc/test/listorder_test.dart
+++ b/samples/third_party/todomvc/test/listorder_test.dart
@@ -4,9 +4,9 @@
library todomvc.test.listorder_test;
+import 'dart:async';
import 'dart:html';
import 'package:polymer/polymer.dart';
-import 'package:polymer/platform.dart' show endOfMicrotask;
import 'package:unittest/unittest.dart';
import 'package:unittest/html_config.dart';
import '../web/model.dart';
@@ -32,7 +32,8 @@ main() {
new Todo('two (checked)')..done = true,
new Todo('three (unchecked)')
]);
- endOfMicrotask(expectAsync0(() {
+ Observable.dirtyCheck();
+ return window.animationFrame.then((_) {
Jennifer Messerly 2013/10/25 21:02:21 one idea here is to use mutation observers to watc
expect(root.queryAll('#todo-list li[is=todo-row]').length, 3);
// TODO(jmesserly): HTML Imports breaks relative hash links when the
@@ -41,27 +42,27 @@ main() {
for (var a in root.queryAll('#filters > li > a')) {
a.href = '#${Uri.parse(a.href).fragment}';
}
- }));
+ });
});
test('navigate to #/active', () {
windowLocation.hash = '#/active';
- endOfMicrotask(expectAsync0(() {
+ return window.animationFrame.then((_) {
expect(root.queryAll('#todo-list li[is=todo-row]').length, 2);
- }));
+ });
});
test('navigate to #/completed', () {
windowLocation.hash = '#/completed';
- endOfMicrotask(expectAsync0(() {
+ return window.animationFrame.then((_) {
expect(root.queryAll('#todo-list li[is=todo-row]').length, 1);
- }));
+ });
});
test('navigate back to #/', () {
windowLocation.hash = '#/';
- endOfMicrotask(expectAsync0(() {
+ return window.animationFrame.then((_) {
expect(root.queryAll('#todo-list li[is=todo-row]').length, 3);
- }));
+ });
});
}
« no previous file with comments | « pkg/polymer/test/unbind_test.dart ('k') | samples/third_party/todomvc/test/markdone_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698