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

Unified Diff: tests/html/measurement_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/measurement_test.dart
===================================================================
--- tests/html/measurement_test.dart (revision 7823)
+++ tests/html/measurement_test.dart (working copy)
@@ -10,32 +10,30 @@
main() {
useHtmlConfiguration();
- asyncTest('measurement is async but before setTimout 0', 1, () {
+ test('measurement is async but before setTimout 0', () {
final element = document.body;
bool timeout0 = false;
bool fnComplete = false;
bool animationFrame = false;
window.setTimeout(() { timeout0 = true; }, 0);
final computedStyle = element.computedStyle;
- computedStyle.then((style) {
+ computedStyle.then(expectAsync1((style) {
Expect.equals(style.getPropertyValue('left'), 'auto');
Expect.isTrue(fnComplete);
Expect.isFalse(timeout0);
Expect.isFalse(animationFrame);
- callbackDone();
- });
+ }));
Expect.isFalse(computedStyle.isComplete);
fnComplete = true;
});
- asyncTest('requestLayoutFrame', 1, () {
+ test('requestLayoutFrame', () {
var rect;
var computedStyle;
- window.requestLayoutFrame(() {
+ window.requestLayoutFrame(expectAsync0(() {
Expect.isTrue(rect.isComplete);
Expect.isTrue(computedStyle.isComplete);
- callbackDone();
- });
+ }));
final element = document.body;
rect = element.rect;

Powered by Google App Engine
This is Rietveld 408576698