blob: 6aa280e9aa61d535301b3850c57382f5a6e43c47 [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 createConicGradient with infinite values'
);
var ctx = document.createElement('canvas').getContext('2d');
shouldThrow("ctx.createConicGradient(0, 100, NaN)", "'TypeError: The provided value is non-finite'");
shouldThrow("ctx.createConicGradient(0, 100, Infinity)", "'TypeError: The provided value is non-finite'");
shouldThrow("ctx.createConicGradient(0, 100, -Infinity)", "'TypeError: The provided value is non-finite'");
shouldThrow("ctx.createConicGradient(0, NaN, 100)", "'TypeError: The provided value is non-finite'");
shouldThrow("ctx.createConicGradient(0, Infinity, 100)", "'TypeError: The provided value is non-finite'");
shouldThrow("ctx.createConicGradient(0, -Infinity, 100)", "'TypeError: The provided value is non-finite'");
shouldThrow("ctx.createConicGradient(NaN, 100, 100)", "'TypeError: The provided value is non-finite'");
shouldThrow("ctx.createConicGradient(Infinity, 100, 100)", "'TypeError: The provided value is non-finite'");
shouldThrow("ctx.createConicGradient(-Infinity, 100, 100)", "'TypeError: The provided value is non-finite'");
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>