+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ .horizontalGallery {
+ width: 400px;
+ height: 50px;
+ overflow-y: hidden;
+ overflow-x: auto;
+ }
+ .horizontalGalleryDrawer {
+ width: 3000px;
+ height: 50px;
+ }
+ .colorBox {
+ height: 50px;
+ width: 400px;
+ float: left;
+ }
+
+ .noInitial {
+ -webkit-scroll-snap-type: mandatory;
+ -webkit-scroll-snap-points-x: repeat(100%);
+ -webkit-scroll-snap-points-y: repeat(100%);
+ -webkit-scroll-snap-coordinate: left top;
+ }
+
+ #item0 { background-color: red; }
+ #item1 { background-color: green; }
+ #item2 { background-color: blue; }
+ #item3 { background-color: aqua; }
+ #item4 { background-color: yellow; }
+ #item5 { background-color: fuchsia; }
+ </style>
+ <script>
+ top.succeeded = true;
+ </script>
+ </head>
+ <body>
+ <div style="width: 400px">
+ <div id="noInitial" class="horizontalGallery noInitial" style="-webkit-scroll-snap-destination: right bottom; -webkit-scroll-snap-coordinate: left top;">
+ <div class="horizontalGalleryDrawer">
+ <div id="item0" class="colorBox"></div>
+ <div id="item1" class="colorBox"></div>
+ <div id="item2" class="colorBox"></div>
+ <div id="item3" class="colorBox"></div>
+ <div id="item4" class="colorBox"></div>
+ <div id="item5" class="colorBox"></div>
+ </div>
+ </div>
+ </div>
+ <div id="console"></div>
+ <script>
+
+ function shouldMatch(_a, _b, result)
+ {
+ if (typeof _a !== "string" || typeof _b !== "string")
+ top.debug("WARN: shouldBeEqualToString() expects string arguments");
+
+ var _av;
+ try {
+ _av = eval(_a);
+ } catch (e) {
+ return false;
+ }
+
+ return top.isResultCorrect(_av, _b);
+ }
+
+ var noInitial = document.getElementById('noInitial');
+ top.succeeded = shouldMatch("window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-type')", "mandatory");
+ top.succeeded = top.succeeded && shouldMatch("window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-points-x')", "repeat(100%)");
+ top.succeeded = top.succeeded && shouldMatch("window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-points-y')", "repeat(100%)");
+ top.succeeded = top.succeeded && shouldMatch("noInitial.style['-webkit-scroll-snap-coordinate']", "0% 0%");
+ top.succeeded = top.succeeded && shouldMatch("window.getComputedStyle(noInitial).getPropertyValue('-webkit-scroll-snap-coordinate')", "0% 0%");
+
+ if (top.succeeded)
+ top.debug("iframe processed all tests successfully.");
+ else
+ top.debug("iframe processing failed.");
+ </script>
+ </body>
+</html>
+