OLD | NEW |
(Empty) | |
| 1 description('This test checks invalid offsets on gradients.'); |
| 2 |
| 3 var gradient = document.createElement('canvas').getContext('2d').createLinearGra
dient(0, 0, 150, 0); |
| 4 |
| 5 // Check that invalid offset values throw. |
| 6 shouldThrow("gradient.addColorStop(-1, '#000')"); |
| 7 shouldThrow("gradient.addColorStop(2, '#000')"); |
| 8 shouldThrow("gradient.addColorStop(Infinity, '#000')"); |
| 9 shouldThrow("gradient.addColorStop(-Infinity, '#000')"); |
| 10 shouldThrow("gradient.addColorStop(NaN, '#000')"); |
OLD | NEW |