| OLD | NEW |
| (Empty) |
| 1 CONSOLE WARNING: line 46: The provided value '3223' is not a valid enum value of
type ImageSmoothingQuality. | |
| 2 CONSOLE WARNING: line 46: The provided value 'bad_input' is not a valid enum val
ue of type ImageSmoothingQuality. | |
| 3 CONSOLE WARNING: line 46: The provided value 'LOW' is not a valid enum value of
type ImageSmoothingQuality. | |
| 4 CONSOLE WARNING: line 46: The provided value 'Medium' is not a valid enum value
of type ImageSmoothingQuality. | |
| 5 Tests for the imageSmoothingQuality attribute. | |
| 6 | |
| 7 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | |
| 8 | |
| 9 | |
| 10 On getting, must return the last value it was set to. | |
| 11 PASS lowContext.imageSmoothingQuality is 'low' | |
| 12 PASS mediumContext.imageSmoothingQuality is 'medium' | |
| 13 PASS highContext.imageSmoothingQuality is 'high' | |
| 14 | |
| 15 PASS lowData is not mediumData | |
| 16 PASS mediumData is highData | |
| 17 PASS lowData is not highData | |
| 18 | |
| 19 PASS sampleAlpha(noFilterData) is sampleAlpha(lowData) | |
| 20 PASS sampleAlpha(lowData) is > sampleAlpha(mediumData) | |
| 21 PASS sampleAlpha(mediumData) is sampleAlpha(highData) | |
| 22 | |
| 23 | |
| 24 On setting, it must be set to the new value. | |
| 25 highContext.imageSmoothingQuality = 'medium'; | |
| 26 PASS highContext.imageSmoothingQuality is 'medium' | |
| 27 PASS scaleImageData(highCanvas, highCanvas.imageSmoothingQuality); is mediumData | |
| 28 highContext.imageSmoothingQuality = 'high'; | |
| 29 PASS highContext.imageSmoothingQuality is 'high' | |
| 30 PASS scaleImageData(highCanvas, highCanvas.imageSmoothingQuality); is highData | |
| 31 | |
| 32 | |
| 33 When the CanvasRenderingContext2D object is created, the attribute must be set t
o 'low'. | |
| 34 PASS document.getElementById("default").getContext("2d").imageSmoothingQuality i
s 'low' | |
| 35 | |
| 36 | |
| 37 ImageSmoothingQuality can be set without real effect when imageSmoothingEnabled
is false. | |
| 38 highContext.imageSmoothingEnabled = false; | |
| 39 PASS highContext.imageSmoothingQuality is 'high' | |
| 40 PASS scaleImageData(highCanvas, highCanvas.imageSmoothingQuality) is noFilterDat
a | |
| 41 highContext.imageSmoothingQuality = 'medium' | |
| 42 PASS highContext.imageSmoothingQuality is 'medium' | |
| 43 PASS scaleImageData(highCanvas, highCanvas.imageSmoothingQuality) is noFilterDat
a | |
| 44 | |
| 45 | |
| 46 Invalid Input is not accpeted. | |
| 47 highContext.imageSmoothingEnabled = true; highContext.imageSmoothingQuality = 'h
igh'; | |
| 48 PASS scaleImageData(highCanvas, '3223') did not throw exception. | |
| 49 PASS highContext.imageSmoothingQuality is 'high' | |
| 50 PASS scaleImageData(highCanvas, 'bad_input') did not throw exception. | |
| 51 PASS highContext.imageSmoothingQuality is 'high' | |
| 52 PASS scaleImageData(highCanvas, 'LOW') did not throw exception. | |
| 53 PASS highContext.imageSmoothingQuality is 'high' | |
| 54 PASS scaleImageData(highCanvas, 'Medium') did not throw exception. | |
| 55 PASS highContext.imageSmoothingQuality is 'high' | |
| 56 | |
| 57 | |
| 58 The save() and restore() should work. | |
| 59 highContext.save(); highContext.imageSmoothingQuality = 'medium'; | |
| 60 PASS highContext.imageSmoothingQuality is 'medium' | |
| 61 PASS scaleImageData(highCanvas, highCanvas.imageSmoothingQuality); is mediumData | |
| 62 PASS highContext.restore(); highContext.imageSmoothingQuality is 'high' | |
| 63 PASS scaleImageData(highCanvas, highCanvas.imageSmoothingQuality); is highData | |
| 64 | |
| 65 PASS successfullyParsed is true | |
| 66 | |
| 67 TEST COMPLETE | |
| 68 | |
| OLD | NEW |