OLD | NEW |
| (Empty) |
1 Tests for the imageSmoothingEnabled attribute. | |
2 | |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | |
4 | |
5 | |
6 Test that the default value is true. | |
7 PASS ctx.webkitImageSmoothingEnabled is true | |
8 Test that false is returned after a the attribute is set to false. | |
9 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. | |
11 PASS ctx.webkitImageSmoothingEnabled is false | |
12 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. | |
14 PASS left_of_center_pixel.data[0] !== 0 is true | |
15 PASS left_of_center_pixel.data[1] !== 0 is true | |
16 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. | |
18 PASS left_of_center_pixel.data[0] is 0 | |
19 PASS left_of_center_pixel.data[1] is 0 | |
20 PASS left_of_center_pixel.data[2] is 0 | |
21 Test that the image is smoothed when imageSmoothingEnabled is set to true. | |
22 PASS left_of_center_pixel.data[0] !== 0 is true | |
23 PASS left_of_center_pixel.data[1] !== 0 is true | |
24 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. | |
26 PASS left_of_center_pixel.data[0] is 0 | |
27 PASS left_of_center_pixel.data[1] is 0 | |
28 PASS left_of_center_pixel.data[2] is 0 | |
29 PASS successfullyParsed is true | |
30 | |
31 TEST COMPLETE | |
32 | |
OLD | NEW |