blob: d11803ae2ca23d5adaa77db8137a7464e2f8b186 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description(
'This test checks createRadialGradient with infinite values'
);
var ctx = document.createElement('canvas').getContext('2d');
shouldThrow("ctx.createRadialGradient(0, 0, 100, 0, 0, NaN)", "'TypeError: The provided value is non-finite'");
shouldThrow("ctx.createRadialGradient(0, 0, 100, 0, 0, Infinity)", "'TypeError: The provided value is non-finite'");
shouldThrow("ctx.createRadialGradient(0, 0, 100, 0, 0, -Infinity)", "'TypeError: The provided value is non-finite'");
shouldThrow("ctx.createRadialGradient(0, 0, 100, 0, NaN, 100)", "'TypeError: The provided value is non-finite'");
shouldThrow("ctx.createRadialGradient(0, 0, 100, 0, Infinity, 100)", "'TypeError: The provided value is non-finite'");
shouldThrow("ctx.createRadialGradient(0, 0, 100, 0, -Infinity, 100)", "'TypeError: The provided value is non-finite'");
shouldThrow("ctx.createRadialGradient(0, 0, 100, NaN, 0, 100)", "'TypeError: The provided value is non-finite'");
shouldThrow("ctx.createRadialGradient(0, 0, 100, Infinity, 0, 100)", "'TypeError: The provided value is non-finite'");
shouldThrow("ctx.createRadialGradient(0, 0, 100, -Infinity, 0, 100)", "'TypeError: The provided value is non-finite'");
shouldThrow("ctx.createRadialGradient(0, 0, NaN, 0, 0, 100)", "'TypeError: The provided value is non-finite'");
shouldThrow("ctx.createRadialGradient(0, 0, Infinity, 0, 0, 100)", "'TypeError: The provided value is non-finite'");
shouldThrow("ctx.createRadialGradient(0, 0, -Infinity, 0, 0, 100)", "'TypeError: The provided value is non-finite'");
shouldThrow("ctx.createRadialGradient(0, NaN, 100, 0, 0, 100)", "'TypeError: The provided value is non-finite'");
shouldThrow("ctx.createRadialGradient(0, Infinity, 100, 0, 0, 100)", "'TypeError: The provided value is non-finite'");
shouldThrow("ctx.createRadialGradient(0, -Infinity, 100, 0, 0, 100)", "'TypeError: The provided value is non-finite'");
shouldThrow("ctx.createRadialGradient(NaN, 0, 100, 0, 0, 100)", "'TypeError: The provided value is non-finite'");
shouldThrow("ctx.createRadialGradient(Infinity, 0, 100, 0, 0, 100)", "'TypeError: The provided value is non-finite'");
shouldThrow("ctx.createRadialGradient(-Infinity, 0, 100, 0, 0, 100)", "'TypeError: The provided value is non-finite'");
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>