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

Unified Diff: tests/html/url_test.dart

Issue 12040059: Converting tests over to using event streams. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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/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.');
});

Powered by Google App Engine
This is Rietveld 408576698