21 lines
610 B
HTML
21 lines
610 B
HTML
<!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>
|