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

Unified Diff: LayoutTests/fast/canvas/drawImage-with-broken-image.html

Issue 181693006: Refactoring source image usage in CanvasRenderingContext2D (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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: LayoutTests/fast/canvas/drawImage-with-broken-image.html
diff --git a/LayoutTests/fast/canvas/drawImage-with-broken-image.html b/LayoutTests/fast/canvas/drawImage-with-broken-image.html
index fc3e96cfff82807041886bb9fdeb5d14e7faeb8c..92b1778ef9df912ed2cdb6861095ad47481d9a14 100644
--- a/LayoutTests/fast/canvas/drawImage-with-broken-image.html
+++ b/LayoutTests/fast/canvas/drawImage-with-broken-image.html
@@ -7,9 +7,6 @@
window.jsTestIsAsync = true;
description("This test checks behavior of Canvas::drawImage with a broken source image.");
- var InvalidStateError = "InvalidStateError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The source width is 0.";
- var TypeMismatchError = "TypeMismatchError: The type of an object was incompatible with the expected type of the parameter associated to the object.";
-
// Create an image with invalid data.
var invalidImage = new Image();
invalidImage.src = 'resources/repaint.js';
@@ -23,11 +20,11 @@
shouldThrow("ctx.drawImage(null, 0, 0, 20, 20, 0, 0, 20, 20)");
// broken images should not throw
- shouldBe("ctx.drawImage(invalidImage, 0, 0)", "undefined");
- shouldBe("ctx.drawImage(invalidImage, 0, 0, 20, 20)", "undefined");
- shouldBe("ctx.drawImage(invalidImage, 0, 0, 20, 20, 0, 0, 20, 20)", "undefined");
- shouldBe("ctx.drawImage(invalidImage, 0, 0, 0, 20)", "undefined");
- shouldBe("ctx.drawImage(invalidImage, 0, 0, 0, 20, 0, 0, 20, 20)", "undefined");
+ shouldThrow("ctx.drawImage(invalidImage, 0, 0)");
+ shouldThrow("ctx.drawImage(invalidImage, 0, 0, 20, 20)");
+ shouldThrow("ctx.drawImage(invalidImage, 0, 0, 20, 20, 0, 0, 20, 20)");
+ shouldThrow("ctx.drawImage(invalidImage, 0, 0, 0, 20)");
+ shouldThrow("ctx.drawImage(invalidImage, 0, 0, 0, 20, 0, 0, 20, 20)");
finishJSTest();
}

Powered by Google App Engine
This is Rietveld 408576698