summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/canvas/script-tests/linearGradient-infinite-values.js
blob: a3f886aaf8ecac18705c3181e4c125808a1e270c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
description(
'This test checks createLinearGradient with infinite values'
);

var ctx = document.createElement('canvas').getContext('2d');

shouldThrow("ctx.createLinearGradient(0, 0, 100, NaN)");
shouldThrow("ctx.createLinearGradient(0, 0, 100, Infinity)");
shouldThrow("ctx.createLinearGradient(0, 0, 100, -Infinity)");
shouldThrow("ctx.createLinearGradient(0, 0, NaN, 100)");
shouldThrow("ctx.createLinearGradient(0, 0, Infinity, 100)");
shouldThrow("ctx.createLinearGradient(0, 0, -Infinity, 100)");
shouldThrow("ctx.createLinearGradient(0, NaN, 100, 100)");
shouldThrow("ctx.createLinearGradient(0, Infinity, 100, 100)");
shouldThrow("ctx.createLinearGradient(0, -Infinity, 100, 100)");
shouldThrow("ctx.createLinearGradient(NaN, 0, 100, 100)");
shouldThrow("ctx.createLinearGradient(Infinity, 0, 100, 100)");
shouldThrow("ctx.createLinearGradient(-Infinity, 0, 100, 100)");