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

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

Issue 289283002: Add some layout tests about behavior on undefined and null. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 7 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 3a9462cc50cde37a780a213782b1c30e160042be..afb0f143f003c867e1a913439a8851b31a6082d7 100644
--- a/LayoutTests/fast/canvas/drawImage-with-broken-image.html
+++ b/LayoutTests/fast/canvas/drawImage-with-broken-image.html
@@ -14,10 +14,13 @@
var ctx = document.createElement("canvas").getContext('2d');
function draw() {
- // null images should throw TypeError
+ // null and undefined images should throw TypeError
shouldThrow("ctx.drawImage(null, 0, 0)");
shouldThrow("ctx.drawImage(null, 0, 0, 20, 20)");
shouldThrow("ctx.drawImage(null, 0, 0, 20, 20, 0, 0, 20, 20)");
+ shouldThrow("ctx.drawImage(undefined, 0, 0)");
+ shouldThrow("ctx.drawImage(undefined, 0, 0, 20, 20)");
+ shouldThrow("ctx.drawImage(undefined, 0, 0, 20, 20, 0, 0, 20, 20)");
// broken images should not throw
shouldThrow("ctx.drawImage(invalidImage, 0, 0)");

Powered by Google App Engine
This is Rietveld 408576698