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

Unified Diff: tests/html/element_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/element_test.dart
===================================================================
--- tests/html/element_test.dart (revision 7823)
+++ tests/html/element_test.dart (working copy)
@@ -53,15 +53,14 @@
Element makeElementWithChildren() =>
new Element.html("<div><br/><img/><input/></div>");
- asyncTest('computedStyle', 1, () {
+ test('computedStyle', () {
final element = document.body;
- element.computedStyle.then((style) {
+ element.computedStyle.then(expectAsync1((style) {
Expect.equals(style.getPropertyValue('left'), 'auto');
- callbackDone();
- });
+ }));
});
- asyncTest('rect', 1, () {
+ test('rect', () {
final container = new Element.tag("div");
container.style.position = 'absolute';
container.style.top = '8px';
@@ -72,7 +71,7 @@
container.elements.add(element);
document.body.elements.add(container);
- element.rect.then((rect) {
+ element.rect.then(expectAsync1((rect) {
expectLargeRect(rect.client);
expectLargeRect(rect.offset);
expectLargeRect(rect.scroll);
@@ -80,8 +79,7 @@
Expect.equals(rect.bounding.top, 8);
Expect.isTrue(rect.clientRects.length > 0);
container.remove();
- callbackDone();
- });
+ }));
});
group('constructors', () {

Powered by Google App Engine
This is Rietveld 408576698