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

Unified Diff: third_party/WebKit/LayoutTests/svg/canvas/canvas-draw-image-globalalpha.html

Issue 1833303002: [Not committed] Make image load completion async and remove EventSender from ImageLoader (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Loader_asyncImageLoadEvent_1
Patch Set: Rebase. Created 4 years, 8 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: third_party/WebKit/LayoutTests/svg/canvas/canvas-draw-image-globalalpha.html
diff --git a/third_party/WebKit/LayoutTests/svg/canvas/canvas-draw-image-globalalpha.html b/third_party/WebKit/LayoutTests/svg/canvas/canvas-draw-image-globalalpha.html
index dec138209f64701cf77e4e90b0cbe4df24061356..d96a27b3d81234387c645688267e5380405b51fb 100644
--- a/third_party/WebKit/LayoutTests/svg/canvas/canvas-draw-image-globalalpha.html
+++ b/third_party/WebKit/LayoutTests/svg/canvas/canvas-draw-image-globalalpha.html
@@ -2,8 +2,11 @@
<canvas width=100 height=100></canvas>
<script>
var img = new Image();
+img.onload = imgOnLoad;
img.src = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="#008000"/></svg>';
-var c = document.querySelector('canvas').getContext('2d');
-c.globalAlpha = 0.5;
-c.drawImage(img, 0, 0);
+function imgOnLoad() {
+ var c = document.querySelector('canvas').getContext('2d');
+ c.globalAlpha = 0.5;
+ c.drawImage(img, 0, 0);
+}
</script>

Powered by Google App Engine
This is Rietveld 408576698