11 .horizontalGalleryDrawer {
22 -webkit-scroll-snap-type: mandatory;
23 -webkit-scroll-snap-points-x: repeat(100%);
24 -webkit-scroll-snap-points-y: repeat(100%);
25 -webkit-scroll-snap-coordinate: left top;
28 #item0 { background-color: red; }
29 #item1 { background-color: green; }
30 #item2 { background-color: blue; }
31 #item3 { background-color: aqua; }
32 #item4 { background-color: yellow; }
33 #item5 { background-color: fuchsia; }
40 <div style="width: 400px">
41 <div id="noInitial" class="horizontalGallery noInitial" style="-webkit-scroll-snap-destination: right bottom; -webkit-scroll-snap-coordinate: left top;">
42 <div class="horizontalGalleryDrawer">
43 <div id="item0" class="colorBox"></div>
44 <div id="item1" class="colorBox"></div>
45 <div id="item2" class="colorBox"></div>
46 <div id="item3" class="colorBox"></div>
47 <div id="item4" class="colorBox"></div>
48 <div id="item5" class="colorBox"></div>
52 <div id="console"></div>
55 function shouldMatch(_a, _b, result)
57 if (typeof _a !== "string" || typeof _b !== "string")
58 top.debug("WARN: shouldBeEqualToString() expects string arguments");
67 return top.isResultCorrect(_av, _b);
70 var noInitial = document.getElementById('noInitial');
71 top.succeeded = shouldMatch("window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-type')", "mandatory");
72 top.succeeded = top.succeeded && shouldMatch("window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-points-x')", "repeat(100%)");
73 top.succeeded = top.succeeded && shouldMatch("window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-points-y')", "repeat(100%)");
74 top.succeeded = top.succeeded && shouldMatch("noInitial.style['-webkit-scroll-snap-coordinate']", "0% 0%");
75 top.succeeded = top.succeeded && shouldMatch("window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-coordinate')", "0% 0%");
78 top.debug("iframe processed all tests successfully.");
80 top.debug("iframe processing failed.");