blob: 9fac2916bf4829ec60db0ca4f63f3695a2fb933f [file] [log] [blame]
Test the behavior of CanvasRenderingContext2D.setShadow() when called with different numbers of arguments.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS ctx.setShadow() threw exception TypeError: Not enough arguments.
PASS ctx.setShadow(0) threw exception TypeError: Not enough arguments.
PASS ctx.setShadow(0, 0) threw exception TypeError: Not enough arguments.
PASS ctx.setShadow(0, 0, 0, 0, 0, 0) threw exception TypeError: Type error.
PASS ctx.setShadow(0, 0, 0, 0, 'red', 0) threw exception TypeError: Type error.
PASS ctx.setShadow(0, 0, 0, 0, 0, 0) threw exception TypeError: Type error.
undefined setShadow(unrestricted float width, unrestricted float height, unrestricted float blur, optional DOMString color, optional unrestricted float alpha)
PASS ctx.setShadow(0, 0, 0, 'red') is undefined
PASS ctx.shadowColor is '#ff0000'
PASS ctx.setShadow(0, 0, 0, 'red', .5) is undefined
PASS ctx.shadowColor is 'rgba(255, 0, 0, 0.5)'
PASS ctx.setShadow(0, 0, 0, 'red', NaN) is undefined
PASS ctx.shadowColor is 'rgba(255, 0, 0, 0.5)'
undefined setShadow(unrestricted float width, unrestricted float height, unrestricted float blur, unrestricted float grayLevel, optional unrestricted float alpha = 1)
PASS ctx.setShadow(0, 0, 0, .25) is undefined
PASS ctx.shadowColor is '#404040'
PASS ctx.setShadow(0, 0, 0, .25, .5) is undefined
PASS ctx.shadowColor is 'rgba(64, 64, 64, 0.5)'
PASS ctx.setShadow(0, 0, 0, NaN, .5) is undefined
PASS ctx.shadowColor is 'rgba(64, 64, 64, 0.5)'
PASS ctx.setShadow(0, 0, 0, .25, NaN) is undefined
PASS ctx.shadowColor is 'rgba(64, 64, 64, 0.5)'
undefined setShadow(unrestricted float width, unrestricted float height, unrestricted float blur, unrestricted float r, unrestricted float g, unrestricted float b, unrestricted float a)
PASS ctx.setShadow(0, 0, 0, .1, .2, .3) threw exception TypeError: Type error.
PASS ctx.setShadow(0, 0, 0, .1, .2, .3, .4) is undefined
PASS ctx.shadowColor is 'rgba(26, 51, 77, 0.4)'
PASS ctx.setShadow(0, 0, 0, NaN, .2, .3, .4) is undefined
PASS ctx.shadowColor is 'rgba(26, 51, 77, 0.4)'
PASS ctx.setShadow(0, 0, 0, .1, NaN, .3, .4) is undefined
PASS ctx.shadowColor is 'rgba(26, 51, 77, 0.4)'
PASS ctx.setShadow(0, 0, 0, .1, .2, NaN, .4) is undefined
PASS ctx.shadowColor is 'rgba(26, 51, 77, 0.4)'
PASS ctx.setShadow(0, 0, 0, .1, .2, .3, NaN) is undefined
PASS ctx.shadowColor is 'rgba(26, 51, 77, 0.4)'
PASS ctx.setShadow(0, 0, 0, .5, .4, .3, .2, .1) is undefined
PASS ctx.shadowColor is 'rgba(128, 102, 77, 0.2)'
PASS ctx.setShadow(0, 0, 0, 1, .4, .3, .2, .1, 0) is undefined
PASS ctx.shadowColor is 'rgba(255, 102, 77, 0.2)'
PASS ctx.setShadow(0, 0, 0, 1.5, 10, -0.1, -100) is undefined
PASS ctx.shadowColor is 'rgba(255, 255, 0, 0)'
PASS successfullyParsed is true
TEST COMPLETE