Skip to content

Fix 2d.drawImage.* and 2d.pattern.image.* tests under 2dcontext to match the spec#5060

Open
EdgarChen wants to merge 2 commits intoweb-platform-tests:masterfrom
EdgarChen:2dcontext
Open

Fix 2d.drawImage.* and 2d.pattern.image.* tests under 2dcontext to match the spec#5060
EdgarChen wants to merge 2 commits intoweb-platform-tests:masterfrom
EdgarChen:2dcontext

Conversation

@EdgarChen
Copy link
Copy Markdown
Member

@EdgarChen EdgarChen commented Mar 7, 2017

This PR is to fix #4648. And I found 2d.pattern.image.* is in similar situation, so I also provide a patch for them here.

1). Fix web-platform-tests#4648.
2). Add test for "list of available images" contains the requested image.
1). 2d.pattern.image.* tests need similar fix for web-platform-tests#4648.
2). Add test for "list of available images" contains the requested image.
@wpt-pr-bot
Copy link
Copy Markdown
Collaborator

Notifying @gsnedders. (Learn how reviewing works.)

@ghost
Copy link
Copy Markdown

ghost commented Mar 7, 2017

View the complete job log.

Firefox (nightly channel)

Testing web-platform-tests at revision 8c91da8
Using browser at version BuildID 20170306110339; SourceStamp 966464a68a2cb3ca1125808e34abb5c1d34e3797
Starting 10 test iterations
All results were stable

All results

10 tests ran
/2dcontext/drawing-images-to-the-canvas/2d.drawImage.cached.html
Subtest Results Messages
OK
Canvas test: 2d.drawImage.cached PASS
/2dcontext/drawing-images-to-the-canvas/2d.drawImage.incomplete.emptysrc.html
Subtest Results Messages
OK
Canvas test: 2d.drawImage.incomplete.emptysrc FAIL assert_approx_equals: Red channel of the pixel at (50, 25) expected 0 +/- 2 but got 255
/2dcontext/drawing-images-to-the-canvas/2d.drawImage.incomplete.immediate.html
Subtest Results Messages
OK
Canvas test: 2d.drawImage.incomplete.immediate PASS
/2dcontext/drawing-images-to-the-canvas/2d.drawImage.incomplete.reload.html
Subtest Results Messages
OK
Canvas test: 2d.drawImage.incomplete.reload FAIL assert_approx_equals: Red channel of the pixel at (50, 25) expected 0 +/- 2 but got 255
/2dcontext/drawing-images-to-the-canvas/2d.drawImage.incomplete.removedsrc.html
Subtest Results Messages
OK
Canvas test: 2d.drawImage.incomplete.removedsrc FAIL assert_approx_equals: Red channel of the pixel at (50, 25) expected 0 +/- 2 but got 255
/2dcontext/fill-and-stroke-styles/2d.pattern.image.cached.html
Subtest Results Messages
OK
Canvas test: 2d.pattern.image.cached PASS
/2dcontext/fill-and-stroke-styles/2d.pattern.image.incomplete.emptysrc.html
Subtest Results Messages
OK
Canvas test: 2d.pattern.image.incomplete.emptysrc FAIL An attempt was made to use an object that is not, or is no longer, usable
/2dcontext/fill-and-stroke-styles/2d.pattern.image.incomplete.immediate.html
Subtest Results Messages
OK
Canvas test: 2d.pattern.image.incomplete.immediate FAIL assert_equals: ctx.createPattern(img, 'repeat') === null (got [object CanvasPattern][object], expected [object]) expected null but got object "[object CanvasPattern]"
/2dcontext/fill-and-stroke-styles/2d.pattern.image.incomplete.reload.html
Subtest Results Messages
OK
Canvas test: 2d.pattern.image.incomplete.reload FAIL assert_equals: Red channel of the pixel at (1, 1) expected 0 but got 255
/2dcontext/fill-and-stroke-styles/2d.pattern.image.incomplete.removedsrc.html
Subtest Results Messages
OK
Canvas test: 2d.pattern.image.incomplete.removedsrc FAIL An attempt was made to use an object that is not, or is no longer, usable

@ghost
Copy link
Copy Markdown

ghost commented Mar 7, 2017

View the complete job log.

Chrome (unstable channel)

Testing web-platform-tests at revision 8c91da8
Using browser at version 58.0.3026.3 dev
Starting 10 test iterations
All results were stable

All results

10 tests ran
/2dcontext/drawing-images-to-the-canvas/2d.drawImage.cached.html
Subtest Results Messages
OK
Canvas test: 2d.drawImage.cached PASS
/2dcontext/drawing-images-to-the-canvas/2d.drawImage.incomplete.emptysrc.html
Subtest Results Messages
OK
Canvas test: 2d.drawImage.incomplete.emptysrc FAIL assert_approx_equals: Red channel of the pixel at (50, 25) expected 0 +/- 2 but got 255
/2dcontext/drawing-images-to-the-canvas/2d.drawImage.incomplete.immediate.html
Subtest Results Messages
OK
Canvas test: 2d.drawImage.incomplete.immediate PASS
/2dcontext/drawing-images-to-the-canvas/2d.drawImage.incomplete.reload.html
Subtest Results Messages
OK
Canvas test: 2d.drawImage.incomplete.reload FAIL assert_approx_equals: Red channel of the pixel at (50, 25) expected 0 +/- 2 but got 255
/2dcontext/drawing-images-to-the-canvas/2d.drawImage.incomplete.removedsrc.html
Subtest Results Messages
OK
Canvas test: 2d.drawImage.incomplete.removedsrc FAIL assert_approx_equals: Red channel of the pixel at (50, 25) expected 0 +/- 2 but got 255
/2dcontext/fill-and-stroke-styles/2d.pattern.image.cached.html
Subtest Results Messages
OK
Canvas test: 2d.pattern.image.cached PASS
/2dcontext/fill-and-stroke-styles/2d.pattern.image.incomplete.emptysrc.html
Subtest Results Messages
OK
Canvas test: 2d.pattern.image.incomplete.emptysrc FAIL assert_equals: Red channel of the pixel at (1, 1) expected 0 but got 255
/2dcontext/fill-and-stroke-styles/2d.pattern.image.incomplete.immediate.html
Subtest Results Messages
OK
Canvas test: 2d.pattern.image.incomplete.immediate PASS
/2dcontext/fill-and-stroke-styles/2d.pattern.image.incomplete.reload.html
Subtest Results Messages
OK
Canvas test: 2d.pattern.image.incomplete.reload FAIL assert_equals: Red channel of the pixel at (1, 1) expected 0 but got 255
/2dcontext/fill-and-stroke-styles/2d.pattern.image.incomplete.removedsrc.html
Subtest Results Messages
OK
Canvas test: 2d.pattern.image.incomplete.removedsrc FAIL assert_equals: Red channel of the pixel at (1, 1) expected 0 but got 255

@gsnedders
Copy link
Copy Markdown
Member

@zcorpan can you r?

ctx.fillRect(0, 0, 100, 50);
var img = document.getElementById('red.png');
var img = document.getElementById('green.png');
img.src = "";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems this case is sync in Chromium and Gecko at least...
Filed whatwg/html#2429

ctx.fillRect(0, 0, 100, 50);
var img = document.getElementById('red.png');
var img = document.getElementById('green.png');
img.removeAttribute('src');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zcorpan
Copy link
Copy Markdown
Member

zcorpan commented Mar 13, 2017

LGTM but there is a possible spec issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2d.drawImage.incomplete.reload.html has wrong assumptions

4 participants