diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
commit | fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch) | |
tree | 4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.worker.js | |
parent | Releasing progress-linux version 124.0.1-1~progress7.99u1. (diff) | |
download | firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.worker.js')
-rw-r--r-- | testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.worker.js | 320 |
1 files changed, 233 insertions, 87 deletions
diff --git a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.worker.js b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.worker.js index bd18524f28..1d56865e68 100644 --- a/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.worker.js +++ b/testing/web-platform/tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.worker.js @@ -16,104 +16,250 @@ t.step(function() { var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); + // Should not throw an error. // dx - _assert(new CanvasFilter({name: 'dropShadow', dx: 10}), "new CanvasFilter({name: 'dropShadow', dx: 10})"); - _assert(new CanvasFilter({name: 'dropShadow', dx: -1}), "new CanvasFilter({name: 'dropShadow', dx: -1})"); - _assert(new CanvasFilter({name: 'dropShadow', dx: 0.5}), "new CanvasFilter({name: 'dropShadow', dx: 0.5})"); - _assert(new CanvasFilter({name: 'dropShadow', dx: null}), "new CanvasFilter({name: 'dropShadow', dx: null})"); - _assert(new CanvasFilter({name: 'dropShadow', dx: true}), "new CanvasFilter({name: 'dropShadow', dx: true})"); - _assert(new CanvasFilter({name: 'dropShadow', dx: false}), "new CanvasFilter({name: 'dropShadow', dx: false})"); - _assert(new CanvasFilter({name: 'dropShadow', dx: []}), "new CanvasFilter({name: 'dropShadow', dx: []})"); - _assert(new CanvasFilter({name: 'dropShadow', dx: [20]}), "new CanvasFilter({name: 'dropShadow', dx: [\""+(20)+"\"]})"); - _assert(new CanvasFilter({name: 'dropShadow', dx: '30'}), "new CanvasFilter({name: 'dropShadow', dx: '30'})"); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: 10}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: -1}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: 0.5}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: null}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: true}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: false}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: []}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: [20]}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: '30'}); // dy - _assert(new CanvasFilter({name: 'dropShadow', dy: 10}), "new CanvasFilter({name: 'dropShadow', dy: 10})"); - _assert(new CanvasFilter({name: 'dropShadow', dy: -1}), "new CanvasFilter({name: 'dropShadow', dy: -1})"); - _assert(new CanvasFilter({name: 'dropShadow', dy: 0.5}), "new CanvasFilter({name: 'dropShadow', dy: 0.5})"); - _assert(new CanvasFilter({name: 'dropShadow', dy: null}), "new CanvasFilter({name: 'dropShadow', dy: null})"); - _assert(new CanvasFilter({name: 'dropShadow', dy: true}), "new CanvasFilter({name: 'dropShadow', dy: true})"); - _assert(new CanvasFilter({name: 'dropShadow', dy: false}), "new CanvasFilter({name: 'dropShadow', dy: false})"); - _assert(new CanvasFilter({name: 'dropShadow', dy: []}), "new CanvasFilter({name: 'dropShadow', dy: []})"); - _assert(new CanvasFilter({name: 'dropShadow', dy: [20]}), "new CanvasFilter({name: 'dropShadow', dy: [\""+(20)+"\"]})"); - _assert(new CanvasFilter({name: 'dropShadow', dy: '30'}), "new CanvasFilter({name: 'dropShadow', dy: '30'})"); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dy: 10}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dy: -1}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dy: 0.5}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dy: null}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dy: true}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dy: false}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dy: []}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dy: [20]}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dy: '30'}); // floodOpacity - _assert(new CanvasFilter({name: 'dropShadow', floodOpacity: 10}), "new CanvasFilter({name: 'dropShadow', floodOpacity: 10})"); - _assert(new CanvasFilter({name: 'dropShadow', floodOpacity: -1}), "new CanvasFilter({name: 'dropShadow', floodOpacity: -1})"); - _assert(new CanvasFilter({name: 'dropShadow', floodOpacity: 0.5}), "new CanvasFilter({name: 'dropShadow', floodOpacity: 0.5})"); - _assert(new CanvasFilter({name: 'dropShadow', floodOpacity: null}), "new CanvasFilter({name: 'dropShadow', floodOpacity: null})"); - _assert(new CanvasFilter({name: 'dropShadow', floodOpacity: true}), "new CanvasFilter({name: 'dropShadow', floodOpacity: true})"); - _assert(new CanvasFilter({name: 'dropShadow', floodOpacity: false}), "new CanvasFilter({name: 'dropShadow', floodOpacity: false})"); - _assert(new CanvasFilter({name: 'dropShadow', floodOpacity: []}), "new CanvasFilter({name: 'dropShadow', floodOpacity: []})"); - _assert(new CanvasFilter({name: 'dropShadow', floodOpacity: [20]}), "new CanvasFilter({name: 'dropShadow', floodOpacity: [\""+(20)+"\"]})"); - _assert(new CanvasFilter({name: 'dropShadow', floodOpacity: '30'}), "new CanvasFilter({name: 'dropShadow', floodOpacity: '30'})"); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodOpacity: 10}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodOpacity: -1}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodOpacity: 0.5}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodOpacity: null}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodOpacity: true}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodOpacity: false}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodOpacity: []}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodOpacity: [20]}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodOpacity: '30'}); + // dx + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: 10}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: -1}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: 0.5}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: null}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: true}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: false}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: []}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: [20]}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: '30'}); + // dy + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dy: 10}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dy: -1}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dy: 0.5}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dy: null}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dy: true}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dy: false}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dy: []}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dy: [20]}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', dy: '30'}); + // floodOpacity + ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodOpacity: 10}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodOpacity: -1}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodOpacity: 0.5}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodOpacity: null}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodOpacity: true}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodOpacity: false}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodOpacity: []}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodOpacity: [20]}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodOpacity: '30'}); // stdDeviation - _assert(new CanvasFilter({name: 'dropShadow', stdDeviation: 10}), "new CanvasFilter({name: 'dropShadow', stdDeviation: 10})"); - _assert(new CanvasFilter({name: 'dropShadow', stdDeviation: -1}), "new CanvasFilter({name: 'dropShadow', stdDeviation: -1})"); - _assert(new CanvasFilter({name: 'dropShadow', stdDeviation: 0.5}), "new CanvasFilter({name: 'dropShadow', stdDeviation: 0.5})"); - _assert(new CanvasFilter({name: 'dropShadow', stdDeviation: null}), "new CanvasFilter({name: 'dropShadow', stdDeviation: null})"); - _assert(new CanvasFilter({name: 'dropShadow', stdDeviation: true}), "new CanvasFilter({name: 'dropShadow', stdDeviation: true})"); - _assert(new CanvasFilter({name: 'dropShadow', stdDeviation: false}), "new CanvasFilter({name: 'dropShadow', stdDeviation: false})"); - _assert(new CanvasFilter({name: 'dropShadow', stdDeviation: []}), "new CanvasFilter({name: 'dropShadow', stdDeviation: []})"); - _assert(new CanvasFilter({name: 'dropShadow', stdDeviation: [20]}), "new CanvasFilter({name: 'dropShadow', stdDeviation: [\""+(20)+"\"]})"); - _assert(new CanvasFilter({name: 'dropShadow', stdDeviation: '30'}), "new CanvasFilter({name: 'dropShadow', stdDeviation: '30'})"); - _assert(new CanvasFilter({name: 'dropShadow', stdDeviation: [10, -1]}), "new CanvasFilter({name: 'dropShadow', stdDeviation: [10, -1]})"); - _assert(new CanvasFilter({name: 'dropShadow', stdDeviation: [0.5, null]}), "new CanvasFilter({name: 'dropShadow', stdDeviation: [0.5, null]})"); - _assert(new CanvasFilter({name: 'dropShadow', stdDeviation: [true, false]}), "new CanvasFilter({name: 'dropShadow', stdDeviation: [true, false]})"); - _assert(new CanvasFilter({name: 'dropShadow', stdDeviation: [[], [20]]}), "new CanvasFilter({name: 'dropShadow', stdDeviation: [[], [\""+(20)+"\"]]})"); - _assert(new CanvasFilter({name: 'dropShadow', stdDeviation: ['30', ['40']]}), "new CanvasFilter({name: 'dropShadow', stdDeviation: ['30', ['40']]})"); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', stdDeviation: 10}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', stdDeviation: -1}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', stdDeviation: 0.5}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', stdDeviation: null}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', stdDeviation: true}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', stdDeviation: false}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', stdDeviation: []}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', stdDeviation: [20]}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', stdDeviation: '30'}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', stdDeviation: [10, -1]}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', stdDeviation: [0.5, null]}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', stdDeviation: [true, false]}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', stdDeviation: [[], [20]]}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', stdDeviation: ['30', ['40']]}); // floodColor - _assert(new CanvasFilter({name: 'dropShadow', floodColor: 'red'}), "new CanvasFilter({name: 'dropShadow', floodColor: 'red'})"); - _assert(new CanvasFilter({name: 'dropShadow', floodColor: 'canvas'}), "new CanvasFilter({name: 'dropShadow', floodColor: 'canvas'})"); - _assert(new CanvasFilter({name: 'dropShadow', floodColor: 'rgba(4, -3, 0.5, 1)'}), "new CanvasFilter({name: 'dropShadow', floodColor: 'rgba(4, -3, 0.5, 1)'})"); - _assert(new CanvasFilter({name: 'dropShadow', floodColor: '#aabbccdd'}), "new CanvasFilter({name: 'dropShadow', floodColor: '#aabbccdd'})"); - _assert(new CanvasFilter({name: 'dropShadow', floodColor: '#abcd'}), "new CanvasFilter({name: 'dropShadow', floodColor: '#abcd'})"); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodColor: 'red'}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodColor: 'canvas'}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodColor: 'rgba(4, -3, 0.5, 1)'}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodColor: '#aabbccdd'}); + ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodColor: '#abcd'}); + // Should throw a TypeError. // dx - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', dx: NaN}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', dx: Infinity}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', dx: -Infinity}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', dx: undefined}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', dx: 'test'}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', dx: {}}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', dx: [1, 2]}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: NaN}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: Infinity}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: -Infinity}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: undefined}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: 'test'}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: {}}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', dx: [1, 2]}); }); // dy - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', dy: NaN}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', dy: Infinity}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', dy: -Infinity}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', dy: undefined}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', dy: 'test'}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', dy: {}}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', dy: [1, 2]}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', dy: NaN}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', dy: Infinity}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', dy: -Infinity}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', dy: undefined}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', dy: 'test'}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', dy: {}}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', dy: [1, 2]}); }); // floodOpacity - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', floodOpacity: NaN}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', floodOpacity: Infinity}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', floodOpacity: -Infinity}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', floodOpacity: undefined}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', floodOpacity: 'test'}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', floodOpacity: {}}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', floodOpacity: [1, 2]}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodOpacity: NaN}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodOpacity: Infinity}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodOpacity: -Infinity}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodOpacity: undefined}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodOpacity: 'test'}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodOpacity: {}}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodOpacity: [1, 2]}); }); // stdDeviation - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', stdDeviation: NaN}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', stdDeviation: Infinity}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', stdDeviation: -Infinity}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', stdDeviation: undefined}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', stdDeviation: 'test'}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', stdDeviation: {}}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', stdDeviation: [1, 2, 3]}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', stdDeviation: [1, NaN]}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', stdDeviation: [1, Infinity]}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', stdDeviation: [1, -Infinity]}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', stdDeviation: [1, undefined]}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', stdDeviation: [1, 'test']}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', stdDeviation: [1, {}]}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', stdDeviation: [1, [2, 3]]}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', stdDeviation: NaN}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', stdDeviation: Infinity}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', stdDeviation: -Infinity}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', stdDeviation: undefined}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', stdDeviation: 'test'}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', stdDeviation: {}}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', stdDeviation: [1, 2, 3]}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', stdDeviation: [1, NaN]}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', stdDeviation: [1, Infinity]}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', stdDeviation: [1, -Infinity]}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', stdDeviation: [1, undefined]}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', stdDeviation: [1, 'test']}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', stdDeviation: [1, {}]}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', stdDeviation: [1, [2, 3]]}); }); // floodColor - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', floodColor: 'test'}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', floodColor: 'rgba(NaN, 3, 2, 1)'}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', floodColor: 10}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', floodColor: undefined}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', floodColor: null}); }); - assert_throws_js(TypeError, function() { new CanvasFilter({name: 'dropShadow', floodColor: NaN}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodColor: 'test'}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodColor: 'rgba(NaN, 3, 2, 1)'}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodColor: 10}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodColor: undefined}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodColor: null}); }); + assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter( + {name: 'dropShadow', floodColor: NaN}); }); t.done(); }); done(); |