summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/canvas/canvas-imageSmoothingQuality-expected.txt
blob: f8f5c93916c1441002aa462fc7952da07445b296 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
CONSOLE WARNING: The provided value '3223' is not a valid enum value of type ImageSmoothingQuality.
CONSOLE WARNING: The provided value 'bad_input' is not a valid enum value of type ImageSmoothingQuality.
CONSOLE WARNING: The provided value 'LOW' is not a valid enum value of type ImageSmoothingQuality.
CONSOLE WARNING: The provided value 'Medium' is not a valid enum value of type ImageSmoothingQuality.
Tests for the imageSmoothingQuality attribute.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


On getting, must return the last value it was set to.
PASS lowContext.imageSmoothingQuality is 'low'
PASS mediumContext.imageSmoothingQuality is 'medium'
PASS highContext.imageSmoothingQuality is 'high'

PASS lowData is not mediumData
PASS mediumData is highData
PASS lowData is not highData

PASS sampleAlpha(noFilterData) is > sampleAlpha(lowData)
PASS sampleAlpha(lowData) is > sampleAlpha(mediumData)
PASS sampleAlpha(mediumData) is sampleAlpha(highData)


On setting, it must be set to the new value.
highContext.imageSmoothingQuality = 'medium';
PASS highContext.imageSmoothingQuality is 'medium'
PASS scaleImageData(highCanvas, highCanvas.imageSmoothingQuality); is mediumData
highContext.imageSmoothingQuality = 'high';
PASS highContext.imageSmoothingQuality is 'high'
PASS scaleImageData(highCanvas, highCanvas.imageSmoothingQuality); is highData


When the CanvasRenderingContext2D object is created, the attribute must be set to 'low'.
PASS document.getElementById("default").getContext("2d").imageSmoothingQuality is 'low'


ImageSmoothingQuality can be set without real effect when imageSmoothingEnabled is false.
highContext.imageSmoothingEnabled = false;
PASS highContext.imageSmoothingQuality is 'high'
PASS scaleImageData(highCanvas, highCanvas.imageSmoothingQuality) is noFilterData
highContext.imageSmoothingQuality = 'medium'
PASS highContext.imageSmoothingQuality is 'medium'
PASS scaleImageData(highCanvas, highCanvas.imageSmoothingQuality) is noFilterData


Invalid Input is not accpeted.
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'


The save() and restore() should work.
highContext.save(); highContext.imageSmoothingQuality = 'medium';
PASS highContext.imageSmoothingQuality is 'medium'
PASS scaleImageData(highCanvas, highCanvas.imageSmoothingQuality); is mediumData
PASS highContext.restore(); highContext.imageSmoothingQuality is 'high'
PASS scaleImageData(highCanvas, highCanvas.imageSmoothingQuality); is highData

PASS successfullyParsed is true

TEST COMPLETE