blob: d19db94e3f999984b1760eb1f696252275217995 [file] [log] [blame]
Tests for the imageSmoothingQuality attribute.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS lowContext.imageSmoothingQuality is 'low'
PASS mediumContext.imageSmoothingQuality is 'medium'
PASS highContext.imageSmoothingQuality is 'high'
PASS lowData is not mediumData
PASS mediumData is not highData
PASS lowData is not highData
PASS sampleAlpha(lowData) is >= sampleAlpha(mediumData)
PASS sampleAlpha(mediumData) is >= sampleAlpha(highData)
PASS defaultContext.imageSmoothingQuality is 'low'
PASS highContext.imageSmoothingEnabled = false; highContext.imageSmoothingQuality is 'high'
PASS highContext.imageSmoothingQuality = 'medium'; highContext.imageSmoothingQuality is 'medium'
highContext.imageSmoothingEnabled = true; highContext.imageSmoothingQuality = 'high';
PASS scaleImageData(highCanvas, '3223') did not throw exception.
PASS highContext.imageSmoothingQuality is 'high'
PASS scaleImageData(highCanvas, 'bad_input') did not throw exception.
PASS highContext.imageSmoothingQuality is 'high'
PASS scaleImageData(highCanvas, 'LOW') did not throw exception.
PASS highContext.imageSmoothingQuality is 'high'
PASS scaleImageData(highCanvas, 'Medium') did not throw exception.
PASS highContext.imageSmoothingQuality is 'high'
highContext.save(); highContext.imageSmoothingQuality = 'medium';
PASS highContext.restore(); highContext.imageSmoothingQuality is 'high'
PASS scaleImageData(highCanvas, highCanvas.imageSmoothingQuality); is highData
PASS successfullyParsed is true
TEST COMPLETE