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..e2afad91a0984fd63c15b1c13338581beab15670 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 |
@@ -36,15 +36,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); |
+img.onload = function() { |
+ 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(); |
@@ -96,4 +98,4 @@ function imageReady(imageBitmap) { |
} |
</script> |
-</body></html> |
+</body></html> |