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

Unified Diff: samples/openglui/src/openglui_canvas_tests.dart

Issue 12428011: Change ImageElement to use onLoad.listen instead of on.load and (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
« no previous file with comments | « runtime/embedders/openglui/common/gl.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/openglui/src/openglui_canvas_tests.dart
===================================================================
--- samples/openglui/src/openglui_canvas_tests.dart (revision 19817)
+++ samples/openglui/src/openglui_canvas_tests.dart (working copy)
@@ -500,9 +500,10 @@
void loadImage() {
initTest("Image loading");
var imageObj = new ImageElement();
- // TODO(Gram): Change gl.dart to handle to onLoad.listen.
- imageObj.on.load.add((e) {
- ctx.drawImage(e, 69, 50);
+ var sub;
+ sub = imageObj.onLoad.listen((e) {
+ ctx.drawImage(e.target, 69, 50);
+ sub.cancel();
});
imageObj.src = 'chrome.png';
}
@@ -741,8 +742,7 @@
} else {
testnum = 0;
}
- update();
- break;
+ return;
}
isDirty = false;
}
« no previous file with comments | « runtime/embedders/openglui/common/gl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698