1 Test the parsing and application of the scroll-snap-* properties.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 Test case: inherited type
7 PASS style.scrollSnapType is "mandatory"
9 Test case: initial type
10 PASS style.scrollSnapType is "none"
12 Test case: inherited points-x
13 PASS style.scrollSnapPointsX is "repeat(20%)"
15 Test case: initial points-x
16 PASS style.scrollSnapPointsX is "none"
18 Test case: inherited points-y
19 PASS style.scrollSnapPointsY is "repeat(20%)"
21 Test case: initial points-y
22 PASS style.scrollSnapPointsY is "none"
24 Test case: inherited destination
25 PASS style.scrollSnapDestination is "20px 20px"
27 Test case: initial destination
28 PASS style.scrollSnapDestination is "0px 0px"
30 Test case: inherited coordinate
31 PASS style.scrollSnapCoordinate is "10px 10px"
33 Test case: initial coordinate
34 PASS style.scrollSnapCoordinate is "none"
36 Test case: mandatory type
37 PASS style.scrollSnapType is "mandatory"
39 Test case: proximity type
40 PASS style.scrollSnapType is "proximity"
43 PASS style.scrollSnapType is "none"
45 Test case: percentage points repeat along x axis
46 PASS style.scrollSnapPointsX is "repeat(100%)"
48 Test case: pixel points repeat along x axis
49 PASS style.scrollSnapPointsX is "repeat(25px)"
51 Test case: percentage points repeat along y axis
52 PASS style.scrollSnapPointsY is "repeat(100%)"
54 Test case: pixel points repeat along y axis
55 PASS style.scrollSnapPointsY is "repeat(25px)"
57 Test case: calc repeat along y axis
58 PASS style.scrollSnapPointsY is "repeat(calc(25px + 1%))"
60 Test case: reject zero
61 PASS style.scrollSnapPointsY is "none"
63 Test case: reject negative
64 PASS style.scrollSnapPointsY is "none"
66 Test case: pixel/pixel destination
67 PASS style.scrollSnapDestination is "10px 50px"
69 Test case: pixel/percentage destination
70 PASS style.scrollSnapDestination is "20px 40%"
72 Test case: unitless/pixel destination
73 PASS style.scrollSnapDestination is "0px 10px"
75 Test case: percentage/pixel destination
76 PASS style.scrollSnapDestination is "0% 0px"
78 Test case: percentage/percentage destination
79 PASS style.scrollSnapDestination is "5% 100%"
81 Test case: calc/percentage destination
82 PASS style.scrollSnapDestination is "calc(20px + 10%) 40%"
84 Test case: 3 piece percentage destination
85 PASS style.scrollSnapDestination is "0% 50%"
87 Test case: 1 piece destination with implied center
88 PASS style.scrollSnapDestination is "50% 0%"
90 Test case: single pixel coordinate
91 PASS style.scrollSnapCoordinate is "50px 100px"
93 Test case: single percentage coordinate
94 PASS style.scrollSnapCoordinate is "50% 100%"
96 Test case: 3 piece percentage coordinate
97 PASS style.scrollSnapCoordinate is "0% 50%"
99 Test case: 4 piece pixel coordinate
100 PASS style.scrollSnapCoordinate is "10px 15px"
102 Test case: 1 piece coordinate with implied center
103 PASS style.scrollSnapCoordinate is "0% 50%"
105 Test case: multiple pixel coordinates
106 PASS style.scrollSnapCoordinate is "50px 100px, 150px 100px, 200px 100px"
108 Test case: multiple percentage coordinates
109 PASS style.scrollSnapCoordinate is "50% 100%, 0% 100%, 200% 100%"
111 Test case: multiple mixed pixel/percentage/calc coordinates
112 PASS style.scrollSnapCoordinate is "calc(100px + 10%) 100%, 150% 50%, 200px calc(10px + 5%)"
114 Test case: reject invalid position list
115 PASS style.scrollSnapCoordinate is "none"
117 Test case: reject invalid position separator
118 PASS style.scrollSnapCoordinate is "none"
120 Test case: reject invalid position with terminating comma
121 PASS style.scrollSnapCoordinate is "none"
123 PASS successfullyParsed is true