Index: tests/html/url_test.dart |
diff --git a/tests/html/url_test.dart b/tests/html/url_test.dart |
index c52b7c6d885ec10f8f93eba1462f743ca50c7d30..f332b30e75e383eec2b61b0bda56cdb1901f59d3 100644 |
--- a/tests/html/url_test.dart |
+++ b/tests/html/url_test.dart |
@@ -41,10 +41,10 @@ main() { |
expect(url, startsWith('blob:')); |
var img = new ImageElement(); |
- img.on.load.add(expectAsync1((_) { |
+ img.onLoad.listen(expectAsync1((_) { |
expect(img.complete, true); |
})); |
- img.on.error.add((_) { |
+ img.onError.listen((_) { |
guardAsync(() { |
expect(true, isFalse, reason: 'URL failed to load.'); |
}); |
@@ -60,9 +60,9 @@ main() { |
var img = new ImageElement(); |
// Image should fail to load since the URL was revoked. |
- img.on.error.add(expectAsync1((_) { |
+ img.onError.listen(expectAsync1((_) { |
})); |
- img.on.load.add((_) { |
+ img.onLoad.listen((_) { |
guardAsync(() { |
expect(true, isFalse, reason: 'URL should not have loaded.'); |
}); |