Fix #688 fatal exception on unmatched color stop

This commit is contained in:
Niklas von Hertzen
2015-10-18 16:51:53 +03:00
parent 4b37909f09
commit 46078acf71
5 changed files with 41 additions and 16 deletions

View File

@ -35,6 +35,15 @@ describe("Gradients", function() {
" to(rgb(191, 110, 78))"
]
},
{
method: 'linear-gradient',
args: [
"0deg",
" rgb(221, 221, 221)",
" rgb(221, 221, 221) 50%",
" transparent 50%"
]
},
{
method: "radial-gradient",
args: [
@ -97,7 +106,7 @@ describe("Gradients", function() {
}
];
$('#backgroundGradients div').each(function(i, node) {
[].slice.call(document.querySelectorAll('#backgroundGradients div'), 0).forEach(function(node, i) {
var container = new html2canvas.NodeContainer(node, null);
var value = container.css("backgroundImage");
it(value, function() {