From 7ed0592b5f4dddd1445b2e3f1595e7b2844b2250 Mon Sep 17 00:00:00 2001 From: "Michael[tm] Smith" Date: Wed, 30 Apr 2014 11:13:52 +0900 Subject: [PATCH] Updated a canvas test to match current spec. --- .../2d.pattern.repeat.null.html | 15 +++++++++++++-- 2dcontext/tools/tests2d.yaml | 17 +++++++++++++++-- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/2dcontext/fill-and-stroke-styles/2d.pattern.repeat.null.html b/2dcontext/fill-and-stroke-styles/2d.pattern.repeat.null.html index d19dd29dbde1f2..667b3699398d9a 100644 --- a/2dcontext/fill-and-stroke-styles/2d.pattern.repeat.null.html +++ b/2dcontext/fill-and-stroke-styles/2d.pattern.repeat.null.html @@ -14,15 +14,26 @@

2d.pattern.repeat.null

Actual output:

FAIL (fallback content)

- +

Expected output:

+ diff --git a/2dcontext/tools/tests2d.yaml b/2dcontext/tools/tests2d.yaml index 50b50d8f22848c..60adbd27711f8d 100644 --- a/2dcontext/tools/tests2d.yaml +++ b/2dcontext/tools/tests2d.yaml @@ -2842,9 +2842,22 @@ - name: 2d.pattern.repeat.null testing: - - 2d.pattern.unrecognised + - 2d.pattern.missing + images: + - green-1x1.png code: | - @assert throws SYNTAX_ERR ctx.createPattern(canvas, null); @moz-todo + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var img = document.getElementById('green-1x1.png'); + var pattern = ctx.createPattern(img, null); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 200, 50); + + @assert pixel 1,1 == 0,255,0,255; + @assert pixel 98,1 == 0,255,0,255; + @assert pixel 1,48 == 0,255,0,255; + @assert pixel 98,48 == 0,255,0,255; + expected: green - name: 2d.pattern.repeat.undefined testing: