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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/canvas-drawImage-out-of-bounds-src.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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/loading/onload/onload-image-data-png.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/canvas/canvas-drawImage-out-of-bounds-src.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-drawImage-out-of-bounds-src.html b/third_party/WebKit/LayoutTests/fast/canvas/canvas-drawImage-out-of-bounds-src.html
index 851733635dd90bd483c8478e419e55d35963d1fb..4fa3946ef5e3b16f99d8b049b7fb304a1308404a 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-drawImage-out-of-bounds-src.html
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-drawImage-out-of-bounds-src.html
@@ -18,6 +18,7 @@ bgctx.fillStyle = 'green';
bgctx.fillRect(0, 0, bgcanvas.width, bgcanvas.height);
var greenSquareURL = bgcanvas.toDataURL();
var img = new Image();
+img.onload = imgLoaded;
img.src = greenSquareURL;
var ctx1 = canvas1.getContext('2d');
var ctx2 = canvas2.getContext('2d');
@@ -36,15 +37,17 @@ ctx1.drawImage(bgcanvas, -100, 0, 200, 200, -25, 175, 100, 100);
ctx1.drawImage(bgcanvas, 0, 0, 100, 200, 75, 175, 100, 100);
ctx1.drawImage(bgcanvas, 0, 0, 200, 200, 175, 175, 100, 100);
-ctx2.drawImage(img, -100, -100, 300, 300, -25, -25, 300, 300);
-ctx2.drawImage(img, -100, -100, 200, 200, -25, -25, 100, 100);
-ctx2.drawImage(img, 0, -100, 100, 200, 75, -25, 100, 100);
-ctx2.drawImage(img, 0, -100, 200, 200, 175, -25, 100, 100);
-ctx2.drawImage(img, -100, 0, 200, 100, -25, 75, 100, 100);
-ctx2.drawImage(img, 0, 0, 200, 100, 175, 75, 100, 100);
-ctx2.drawImage(img, -100, 0, 200, 200, -25, 175, 100, 100);
-ctx2.drawImage(img, 0, 0, 100, 200, 75, 175, 100, 100);
-ctx2.drawImage(img, 0, 0, 200, 200, 175, 175, 100, 100);
+function imgLoaded() {
+ ctx2.drawImage(img, -100, -100, 300, 300, -25, -25, 300, 300);
+ ctx2.drawImage(img, -100, -100, 200, 200, -25, -25, 100, 100);
+ ctx2.drawImage(img, 0, -100, 100, 200, 75, -25, 100, 100);
+ ctx2.drawImage(img, 0, -100, 200, 200, 175, -25, 100, 100);
+ ctx2.drawImage(img, -100, 0, 200, 100, -25, 75, 100, 100);
+ ctx2.drawImage(img, 0, 0, 200, 100, 175, 75, 100, 100);
+ ctx2.drawImage(img, -100, 0, 200, 200, -25, 175, 100, 100);
+ ctx2.drawImage(img, 0, 0, 100, 200, 75, 175, 100, 100);
+ ctx2.drawImage(img, 0, 0, 200, 200, 175, 175, 100, 100);
+}
if (window.testRunner) {
testRunner.waitUntilDone();
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/loading/onload/onload-image-data-png.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698