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

Unified Diff: tests/html/events_test.dart

Issue 218273002: Upgrading tests with unittest deprecations (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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/events_test.dart
diff --git a/tests/html/events_test.dart b/tests/html/events_test.dart
index 3b87540abf06fdad334c4739e5ec0e0adfcb893d..b2c448ab7fbeea46b96ebd7ce5d6ffca13f9e768 100644
--- a/tests/html/events_test.dart
+++ b/tests/html/events_test.dart
@@ -96,8 +96,8 @@ main() {
document.body.append(element);
// runZoned executes the function synchronously, but we don't want to
- // rely on this. We therefore wrap it into an expectAsync0.
- runZoned(expectAsync0(() {
+ // rely on this. We therefore wrap it into an expectAsync.
+ runZoned(expectAsync(() {
Zone zone = Zone.current;
expect(zone, isNot(equals(Zone.ROOT)));
@@ -106,13 +106,13 @@ main() {
void handler(Event e) {
expect(Zone.current, equals(zone));
- scheduleMicrotask(expectAsync0(() {
+ scheduleMicrotask(expectAsync(() {
expect(Zone.current, equals(zone));
sub.cancel();
}));
}
- sub = element.on['test'].listen(expectAsync1(handler));
+ sub = element.on['test'].listen(expectAsync(handler));
}));
element.dispatchEvent(new Event('test'));
});

Powered by Google App Engine
This is Rietveld 408576698