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

Unified Diff: LayoutTests/fast/canvas/canvas-pattern-behaviour.js

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/canvas-pattern-behaviour.js
diff --git a/LayoutTests/fast/canvas/canvas-pattern-behaviour.js b/LayoutTests/fast/canvas/canvas-pattern-behaviour.js
index a476571334fba9bf261497124defaff686ab12e7..8d6f3a5bb18d6d6b8d95beadd1bb9b8316e75340 100644
--- a/LayoutTests/fast/canvas/canvas-pattern-behaviour.js
+++ b/LayoutTests/fast/canvas/canvas-pattern-behaviour.js
@@ -68,6 +68,18 @@ var tests = [
shouldThrow("context.createPattern(green1x1, {toString:function(){ return null;}})");
},
function () {
+ shouldThrow("context.createPattern(null, '')");
+ },
+ function () {
+ shouldThrow("context.createPattern(undefined, '')");
+ },
+ function () {
+ shouldThrow("context.createPattern({}, '')");
+ },
+ function () {
+ shouldThrow("context.createPattern([], '')");
+ },
+ function () {
var didThrow = false;
try {
var pattern = context.createPattern(green1x1, '');

Powered by Google App Engine
This is Rietveld 408576698