blob: 2885832770abb01d494b70bfbf335ac34e094112 [file] [log] [blame]
Test that CanvasRenderingContext2D supports the 'currentColor' value.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS ctx.shadowColor = '#f00'; ctx.shadowColor is '#ff0000'
PASS ctx.shadowColor = 'currentColor'; ctx.shadowColor is '#000000'
PASS ctx.fillStyle = '#f00'; ctx.fillStyle is '#ff0000'
PASS ctx.fillStyle = 'currentColor'; ctx.fillStyle is '#000000'
PASS ctx.strokeStyle = '#f00'; ctx.strokeStyle is '#ff0000'
PASS ctx.strokeStyle = 'currentColor'; ctx.strokeStyle is '#000000'
PASS ctx.setShadow(0, 0, 0, '#f00'); ctx.shadowColor is '#ff0000'
PASS ctx.setShadow(0, 0, 0, 'currentColor'); ctx.shadowColor is '#000000'
PASS ctx.setShadow(0, 0, 0, '#f00', 0.0); ctx.shadowColor is 'rgba(255, 0, 0, 0)'
PASS ctx.setShadow(0, 0, 0, 'currentColor', 0.0); ctx.shadowColor is 'rgba(0, 0, 0, 0)'
PASS ctx.setStrokeColor('#f00'); ctx.strokeStyle is '#ff0000'
PASS ctx.setStrokeColor('currentColor'); ctx.strokeStyle is '#000000'
PASS ctx.setStrokeColor('#f00', 0.0); ctx.strokeStyle is 'rgba(255, 0, 0, 0)'
PASS ctx.setStrokeColor('currentColor', 0.0); ctx.strokeStyle is 'rgba(0, 0, 0, 0)'
PASS ctx.setFillColor('#f00'); ctx.fillStyle is '#ff0000'
PASS ctx.setFillColor('currentColor'); ctx.fillStyle is '#000000'
PASS ctx.setFillColor('#f00', 0.0); ctx.fillStyle is 'rgba(255, 0, 0, 0)'
PASS ctx.setFillColor('currentColor', 0.0); ctx.fillStyle is 'rgba(0, 0, 0, 0)'
PASS tryLinearGradientColor('#f00') is '255,0,0,255'
PASS tryLinearGradientColor('currentColor') is '0,0,0,255'
PASS tryRadialGradientColor('#f00') is '255,0,0,255'
PASS tryRadialGradientColor('currentColor') is '0,0,0,255'
PASS attachCanvasToDocument() is true
PASS canvas.style.color = '#123456'; canvas.style.color is 'rgb(18, 52, 86)'
PASS ctx.shadowColor = '#f00'; ctx.shadowColor is '#ff0000'
PASS ctx.shadowColor = 'currentColor'; ctx.shadowColor is '#123456'
PASS ctx.fillStyle = '#f00'; ctx.fillStyle is '#ff0000'
PASS ctx.fillStyle = 'currentColor'; ctx.fillStyle is '#123456'
PASS ctx.strokeStyle = '#f00'; ctx.strokeStyle is '#ff0000'
PASS ctx.strokeStyle = 'currentColor'; ctx.strokeStyle is '#123456'
PASS ctx.setShadow(0, 0, 0, '#f00'); ctx.shadowColor is '#ff0000'
PASS ctx.setShadow(0, 0, 0, 'currentColor'); ctx.shadowColor is '#123456'
PASS ctx.setShadow(0, 0, 0, '#f00', 0.0); ctx.shadowColor is 'rgba(255, 0, 0, 0)'
PASS ctx.setShadow(0, 0, 0, 'currentColor', 0.0); ctx.shadowColor is 'rgba(18, 52, 86, 0)'
PASS ctx.setStrokeColor('#f00'); ctx.strokeStyle is '#ff0000'
PASS ctx.setStrokeColor('currentColor'); ctx.strokeStyle is '#123456'
PASS ctx.setStrokeColor('#f00', 0.0); ctx.strokeStyle is 'rgba(255, 0, 0, 0)'
PASS ctx.setStrokeColor('currentColor', 0.0); ctx.strokeStyle is 'rgba(18, 52, 86, 0)'
PASS ctx.setFillColor('#f00'); ctx.fillStyle is '#ff0000'
PASS ctx.setFillColor('currentColor'); ctx.fillStyle is '#123456'
PASS ctx.setFillColor('#f00', 0.0); ctx.fillStyle is 'rgba(255, 0, 0, 0)'
PASS ctx.setFillColor('currentColor', 0.0); ctx.fillStyle is 'rgba(18, 52, 86, 0)'
PASS tryLinearGradientColor('#f00') is '255,0,0,255'
PASS tryLinearGradientColor('currentColor') is '0,0,0,255'
PASS tryRadialGradientColor('#f00') is '255,0,0,255'
PASS tryRadialGradientColor('currentColor') is '0,0,0,255'
PASS ctx.shadowColor = '#f00'; ctx.shadowColor is '#ff0000'
PASS ctx.shadowColor = 'CURRENTCOLOR'; ctx.shadowColor is '#123456'
PASS successfullyParsed is true
TEST COMPLETE