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

Unified Diff: tests/html/xmldocument_test.dart

Issue 10412015: aChange all asyncTest/callbackDone style tests to use the new expectAsync/ (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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: tests/html/xmldocument_test.dart
===================================================================
--- tests/html/xmldocument_test.dart (revision 7823)
+++ tests/html/xmldocument_test.dart (working copy)
@@ -528,15 +528,14 @@
});
group('default values', () {
- asyncTest('default rect values', 1, () {
- makeDocument().rect.then((ElementRect rect) {
+ test('default rect values', () {
+ makeDocument().rect.then(expectAsync1((ElementRect rect) {
expectEmptyRect(rect.client);
expectEmptyRect(rect.offset);
expectEmptyRect(rect.scroll);
expectEmptyRect(rect.bounding);
Expect.isTrue(rect.clientRects.isEmpty());
- callbackDone();
- });
+ }));
});
test('nextElementSibling', () =>
@@ -567,28 +566,26 @@
// test('webkitVisibilityState', () =>
// Expect.equals('visible', makeDocument().webkitVisibilityState));
- asyncTest('caretRangeFromPoint', 1, () {
+ test('caretRangeFromPoint', () {
final doc = makeDocument();
Futures.wait([
doc.caretRangeFromPoint(),
doc.caretRangeFromPoint(0, 0),
doc.caretRangeFromPoint(5, 5)
- ]).then((ranges) {
+ ]).then(expectAsync1((ranges) {
Expect.listEquals([null, null, null], ranges);
- callbackDone();
- });
+ }));
});
- asyncTest('elementFromPoint', 1, () {
+ test('elementFromPoint', () {
final doc = makeDocument();
Futures.wait([
doc.elementFromPoint(),
doc.elementFromPoint(0, 0),
doc.elementFromPoint(5, 5)
- ]).then((ranges) {
+ ]).then(expectAsync1((ranges) {
Expect.listEquals([null, null, null], ranges);
- callbackDone();
- });
+ }));
});
test('queryCommandEnabled', () {

Powered by Google App Engine
This is Rietveld 408576698