OLD | NEW |
| 1 CONSOLE WARNING: 'CanvasRenderingContext2D.webkitImageSmoothingEnabled' is depre
cated. Please use 'CanvasRenderingContext2D.imageSmoothingEnabled' instead. |
1 Tests for the imageSmoothingEnabled attribute. | 2 Tests for the imageSmoothingEnabled attribute. |
2 | 3 |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 4 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
4 | 5 |
5 | 6 |
6 Test that the default value is true. | 7 Test that the default value is true. |
7 PASS ctx.imageSmoothingEnabled is true | 8 PASS ctx.imageSmoothingEnabled is true |
| 9 PASS ctx.webkitImageSmoothingEnabled is true |
8 Test that false is returned after a the attribute is set to false. | 10 Test that false is returned after a the attribute is set to false. |
9 PASS ctx.imageSmoothingEnabled is false | 11 PASS ctx.imageSmoothingEnabled is false |
| 12 PASS ctx.webkitImageSmoothingEnabled is false |
10 Test that restore works. We save a false state; create, then save a true state;
and then finally restore. | 13 Test that restore works. We save a false state; create, then save a true state;
and then finally restore. |
11 PASS ctx.imageSmoothingEnabled is false | 14 PASS ctx.imageSmoothingEnabled is false |
12 New canvas element created. | 15 New canvas element created. |
13 Test that the image is smoothed by default. We check by making sure the pixel ju
st to the left of the middle line is not completely black. | 16 Test that the image is smoothed by default. We check by making sure the pixel ju
st to the left of the middle line is not completely black. |
14 PASS left_of_center_pixel.data[0] !== 0 is true | 17 PASS left_of_center_pixel.data[0] !== 0 is true |
15 PASS left_of_center_pixel.data[1] !== 0 is true | 18 PASS left_of_center_pixel.data[1] !== 0 is true |
16 PASS left_of_center_pixel.data[2] !== 0 is true | 19 PASS left_of_center_pixel.data[2] !== 0 is true |
17 Test that nearest neighbour is used when imageSmoothingEnabled is set to false.
We check this by making sure the pixel just to the left of the middle line is co
mpletely black. | 20 Test that nearest neighbour is used when imageSmoothingEnabled is set to false.
We check this by making sure the pixel just to the left of the middle line is co
mpletely black. |
18 PASS left_of_center_pixel.data[0] is 0 | 21 PASS left_of_center_pixel.data[0] is 0 |
19 PASS left_of_center_pixel.data[1] is 0 | 22 PASS left_of_center_pixel.data[1] is 0 |
20 PASS left_of_center_pixel.data[2] is 0 | 23 PASS left_of_center_pixel.data[2] is 0 |
21 Test that the image is smoothed when imageSmoothingEnabled is set to true. | 24 Test that the image is smoothed when imageSmoothingEnabled is set to true. |
22 PASS left_of_center_pixel.data[0] !== 0 is true | 25 PASS left_of_center_pixel.data[0] !== 0 is true |
23 PASS left_of_center_pixel.data[1] !== 0 is true | 26 PASS left_of_center_pixel.data[1] !== 0 is true |
24 PASS left_of_center_pixel.data[2] !== 0 is true | 27 PASS left_of_center_pixel.data[2] !== 0 is true |
25 Test that restoring actually changes smoothing and not just the attribute value.
We are restoring to a point where imageSmoothingEnabled is set to false. | 28 Test that restoring actually changes smoothing and not just the attribute value.
We are restoring to a point where imageSmoothingEnabled is set to false. |
26 PASS left_of_center_pixel.data[0] is 0 | 29 PASS left_of_center_pixel.data[0] is 0 |
27 PASS left_of_center_pixel.data[1] is 0 | 30 PASS left_of_center_pixel.data[1] is 0 |
28 PASS left_of_center_pixel.data[2] is 0 | 31 PASS left_of_center_pixel.data[2] is 0 |
29 PASS successfullyParsed is true | 32 PASS successfullyParsed is true |
30 | 33 |
31 TEST COMPLETE | 34 TEST COMPLETE |
32 | 35 |
OLD | NEW |