blob: 9e2b0a19e876565936a0a9db3b7aef487b7708d7 [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 invalid colors on gradients.'
);
var gradient = document.createElement('canvas').getContext('2d').createLinearGradient(0, 0, 150, 0);
shouldThrowErrorName("gradient.addColorStop(0, '')", "SyntaxError");
shouldThrowErrorName("gradient.addColorStop(0, '#cc')", "SyntaxError");
shouldThrowErrorName("gradient.addColorStop(0, 'rgb(257, 0)')", "SyntaxError");
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>