<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[183707] trunk/LayoutTests</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/183707">183707</a></dd>
<dt>Author</dt> <dd>bfulgham@apple.com</dd>
<dt>Date</dt> <dd>2015-05-01 18:44:54 -0700 (Fri, 01 May 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Create a set of initial scroll snap point tests
https://bugs.webkit.org/show_bug.cgi?id=142358

Reviewed by Simon Fraser.

* platform/mac-wk2/tiled-drawing/scrolling/scroll-snap: Added.
* platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html: Added.
* platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html: Added.
* platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html: Added.
* platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/</li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingscrollsnapscrollsnapmandatorymainframehorizontalexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingscrollsnapscrollsnapmandatorymainframehorizontalhtml">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingscrollsnapscrollsnapmandatorymainframeslowhorizontalexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingscrollsnapscrollsnapmandatorymainframeslowhorizontalhtml">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingscrollsnapscrollsnapmandatorymainframeslowverticalexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingscrollsnapscrollsnapmandatorymainframeslowverticalhtml">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingscrollsnapscrollsnapmandatorymainframeverticalexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingscrollsnapscrollsnapmandatorymainframeverticalhtml">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (183706 => 183707)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-05-02 01:29:29 UTC (rev 183706)
+++ trunk/LayoutTests/ChangeLog        2015-05-02 01:44:54 UTC (rev 183707)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2015-05-01  Brent Fulgham  &lt;bfulgham@apple.com&gt;
+
+        Create a set of initial scroll snap point tests
+        https://bugs.webkit.org/show_bug.cgi?id=142358
+
+        Reviewed by Simon Fraser.
+
+        * platform/mac-wk2/tiled-drawing/scrolling/scroll-snap: Added.
+        * platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal-expected.txt: Added.
+        * platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html: Added.
+        * platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal-expected.txt: Added.
+        * platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html: Added.
+        * platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical-expected.txt: Added.
+        * platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html: Added.
+        * platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-expected.txt: Added.
+        * platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html: Added.
+
</ins><span class="cx"> 2015-05-01  Andreas Kling  &lt;akling@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reproducible crash removing name attribute from &lt;img&gt; node
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingscrollsnapscrollsnapmandatorymainframehorizontalexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal-expected.txt (0 => 183707)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal-expected.txt        2015-05-02 01:44:54 UTC (rev 183707)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+PASS successfullyParsed is true
+
+TEST COMPLETE
+PASS div scrolled to next window.
+PASS div honored snap points.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingscrollsnapscrollsnapmandatorymainframehorizontalhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html (0 => 183707)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html        2015-05-02 01:44:54 UTC (rev 183707)
</span><span class="lines">@@ -0,0 +1,123 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+    &lt;head&gt;
+        &lt;style&gt;
+            .horizontalGallery {
+                width: 600vw;
+                height: 100vh;
+                margin: 0;
+                padding: 0;
+                -webkit-scroll-snap-points-x: repeat(100vw);
+                -webkit-scroll-snap-type: mandatory;
+            }
+            .colorBox {
+                height: 100vh;
+                width: 100vw;
+                float: left;
+            }
+            #item0 { background-color: red; }
+            #item1 { background-color: green; }
+            #item2 { background-color: blue; }
+            #item3 { background-color: aqua; }
+            #item4 { background-color: yellow; }
+            #item5 { background-color: fuchsia; }
+        &lt;/style&gt;
+        &lt;script src=&quot;../../../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+        &lt;script&gt;
+        var divTarget;
+        var divScrollPositionBeforeGlide;
+        var divScrollPositionBeforeSnap;
+
+        function checkForScrollSnap() {
+            // The div should have snapped back to the previous position
+            if (divTarget.scrollLeft != divScrollPositionBeforeSnap)
+                testFailed(&quot;div did not snap back to proper location. Expected &quot; + divScrollPositionBeforeSnap + &quot;, but got &quot; + divTarget.scrollLeft);
+            else
+                testPassed(&quot;div honored snap points.&quot;);
+
+            testRunner.notifyDone();
+        }
+
+        function scrollSnapTest() {
+            // See where our div lives:
+            pageScrollPositionBefore = document.body.scrollLeft;
+
+            divTarget = document.getElementById('target');

+            divScrollPositionBeforeSnap = divTarget.scrollLeft;
+
+            var startPosX = divTarget.offsetLeft + 20;
+            var startPosY = divTarget.offsetTop + 20;
+            eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'began', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', false);
+            eventSender.callAfterScrollingCompletes(checkForScrollSnap);
+        }
+
+        function checkForScrollGlide() {
+            // The div should have scrolled (glided) to the next snap point.
+            if (divTarget.scrollLeft == window.innerWidth)
+                testPassed(&quot;div scrolled to next window.&quot;);
+            else
+                testFailed(&quot;div did not honor snap points. Expected &quot; + window.innerWidth + &quot;, but got &quot; + divTarget.scrollLeft);
+
+            setTimeout(scrollSnapTest, 0);
+        }
+
+        function scrollGlideTest() {
+            divTarget = document.getElementById('target');

+            divScrollPositionBeforeGlide = divTarget.scrollLeft;
+
+            var startPosX = divTarget.offsetLeft + 20;
+            var startPosY = divTarget.offsetTop + 20;
+            eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'began', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'begin', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'continue', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'continue', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'continue', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'continue', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', false);
+            eventSender.callAfterScrollingCompletes(checkForScrollGlide);
+        }
+
+        function onLoad() {
+
+            if (window.eventSender) {
+                testRunner.waitUntilDone();
+
+                eventSender.monitorWheelEvents();
+                setTimeout(scrollGlideTest, 0);
+            } else {
+                var messageLocation = document.getElementById('item0');
+                var message = document.createElement('div');
+                message.innerHTML = &quot;&lt;p&gt;This test is better run under DumpRenderTree. To manually test it, place the mouse pointer&lt;br/&gt;&quot;
+                    + &quot;inside the red region at the top of the page, and then use the mouse wheel or a two-finger swipe to make a&lt;br/&gt;&quot;
+                    + &quot;small swipe gesture with some momentum.&lt;br/&gt;&lt;br/&gt;&quot;
+                    + &quot;The region should scroll to show a green region.&lt;br/&gt;&lt;br/&gt;&quot;
+                    + &quot;Next, perform a small scroll gesture that does not involve momentum. You should begin to see one of the colors&lt;br/&gt;&quot;
+                    + &quot;to the left (or right) of the current green box. When you release the wheel, the region should scroll back so&lt;br/&gt;&quot;
+                    + &quot;that the region is a single color.&lt;br/&gt;&lt;br/&gt;&quot;
+                    + &quot;You should also be able to repeat these test steps for the vertical region below.&lt;/p&gt;&quot;;
+                messageLocation.appendChild(message);
+            }
+        }
+        &lt;/script&gt;
+    &lt;/head&gt;
+    &lt;body onload=&quot;onLoad();&quot; class=&quot;horizontalGallery&quot; id=&quot;target&quot;&gt;
+        &lt;div id=&quot;item0&quot; class=&quot;colorBox&quot;&gt;&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+        &lt;div id=&quot;item1&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+        &lt;div id=&quot;item2&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+        &lt;div id=&quot;item3&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+        &lt;div id=&quot;item4&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+        &lt;div id=&quot;item5&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+        &lt;script src=&quot;../../../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+    &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingscrollsnapscrollsnapmandatorymainframeslowhorizontalexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal-expected.txt (0 => 183707)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal-expected.txt        2015-05-02 01:44:54 UTC (rev 183707)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+PASS successfullyParsed is true
+
+TEST COMPLETE
+PASS div scrolled to next window.
+PASS div honored snap points.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingscrollsnapscrollsnapmandatorymainframeslowhorizontalhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html (0 => 183707)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html        2015-05-02 01:44:54 UTC (rev 183707)
</span><span class="lines">@@ -0,0 +1,123 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+    &lt;head&gt;
+        &lt;style&gt;
+            .horizontalGallery {
+                width: 600vw;
+                height: 100vh;
+                margin: 0;
+                padding: 0;
+                -webkit-scroll-snap-points-x: repeat(100vw);
+                -webkit-scroll-snap-type: mandatory;
+            }
+            .colorBox {
+                height: 100vh;
+                width: 100vw;
+                float: left;
+            }
+            #item0 { background-color: red; background-image: url('../../resources/green-blue.png'); background-attachment: fixed;}
+            #item1 { background-color: green; }
+            #item2 { background-color: blue; }
+            #item3 { background-color: aqua; }
+            #item4 { background-color: yellow; }
+            #item5 { background-color: fuchsia; }
+        &lt;/style&gt;
+        &lt;script src=&quot;../../../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+        &lt;script&gt;
+        var divTarget;
+        var divScrollPositionBeforeGlide;
+        var divScrollPositionBeforeSnap;
+
+        function checkForScrollSnap() {
+            // The div should have snapped back to the previous position
+            if (divTarget.scrollLeft != divScrollPositionBeforeSnap)
+                testFailed(&quot;div did not snap back to proper location.&quot;);
+            else
+                testPassed(&quot;div honored snap points.&quot;);
+
+            testRunner.notifyDone();
+        }
+
+        function scrollSnapTest() {
+            // See where our div lives:
+            pageScrollPositionBefore = document.body.scrollLeft;
+
+            divTarget = document.getElementById('target');

+            divScrollPositionBeforeSnap = divTarget.scrollLeft;
+
+            var startPosX = divTarget.offsetLeft + 20;
+            var startPosY = divTarget.offsetTop + 20;
+            eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'began', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', false);
+            eventSender.callAfterScrollingCompletes(checkForScrollSnap);
+        }
+
+        function checkForScrollGlide() {
+            // The div should have scrolled (glided) to the next snap point.
+            if (divTarget.scrollLeft == window.innerWidth)
+                testPassed(&quot;div scrolled to next window.&quot;);
+            else
+                testFailed(&quot;div did not honor snap points.&quot;);
+
+            setTimeout(scrollSnapTest, 0);
+        }
+
+        function scrollGlideTest() {
+            divTarget = document.getElementById('target');

+            divScrollPositionBeforeGlide = divTarget.scrollLeft;
+
+            var startPosX = divTarget.offsetLeft + 20;
+            var startPosY = divTarget.offsetTop + 20;
+            eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'began', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'begin', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'continue', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'continue', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'continue', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'none', 'continue', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', false);
+            eventSender.callAfterScrollingCompletes(checkForScrollGlide);
+        }
+
+        function onLoad() {
+
+            if (window.eventSender) {
+                testRunner.waitUntilDone();
+
+                eventSender.monitorWheelEvents();
+                setTimeout(scrollGlideTest, 0);
+            } else {
+                var messageLocation = document.getElementById('item0');
+                var message = document.createElement('div');
+                message.innerHTML = &quot;&lt;p&gt;This test is better run under DumpRenderTree. To manually test it, place the mouse pointer&lt;br/&gt;&quot;
+                    + &quot;inside the red region at the top of the page, and then use the mouse wheel or a two-finger swipe to make a&lt;br/&gt;&quot;
+                    + &quot;small swipe gesture with some momentum.&lt;br/&gt;&lt;br/&gt;&quot;
+                    + &quot;The region should scroll to show a green region.&lt;br/&gt;&lt;br/&gt;&quot;
+                    + &quot;Next, perform a small scroll gesture that does not involve momentum. You should begin to see one of the colors&lt;br/&gt;&quot;
+                    + &quot;to the left (or right) of the current green box. When you release the wheel, the region should scroll back so&lt;br/&gt;&quot;
+                    + &quot;that the region is a single color.&lt;br/&gt;&lt;br/&gt;&quot;
+                    + &quot;You should also be able to repeat these test steps for the vertical region below.&lt;/p&gt;&quot;;
+                messageLocation.appendChild(message);
+            }
+        }
+        &lt;/script&gt;
+    &lt;/head&gt;
+    &lt;body onload=&quot;onLoad();&quot; class=&quot;horizontalGallery&quot; id=&quot;target&quot;&gt;
+        &lt;div id=&quot;item0&quot; class=&quot;colorBox&quot;&gt;&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+        &lt;div id=&quot;item1&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+        &lt;div id=&quot;item2&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+        &lt;div id=&quot;item3&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+        &lt;div id=&quot;item4&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+        &lt;div id=&quot;item5&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+        &lt;script src=&quot;../../../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+    &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingscrollsnapscrollsnapmandatorymainframeslowverticalexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical-expected.txt (0 => 183707)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical-expected.txt        2015-05-02 01:44:54 UTC (rev 183707)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+PASS successfullyParsed is true
+
+TEST COMPLETE
+PASS div scrolled to next window.
+PASS div honored snap points.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingscrollsnapscrollsnapmandatorymainframeslowverticalhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html (0 => 183707)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html        2015-05-02 01:44:54 UTC (rev 183707)
</span><span class="lines">@@ -0,0 +1,123 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+    &lt;head&gt;
+        &lt;style&gt;
+            .verticalGallery {
+                width: 100vw;
+                height: 600vh;
+                margin: 0;
+                padding: 0;
+                -webkit-scroll-snap-points-y: repeat(100vh);
+                -webkit-scroll-snap-type: mandatory;
+            }
+            .colorBox {
+                height: 100vh;
+                width: 100vw;
+                float: left;
+            }
+            #item0 { background-color: red; background-image: url('../../resources/green-blue.png'); background-attachment: fixed;}
+            #item1 { background-color: green; }
+            #item2 { background-color: blue; }
+            #item3 { background-color: aqua; }
+            #item4 { background-color: yellow; }
+            #item5 { background-color: fuchsia; }
+        &lt;/style&gt;
+        &lt;script src=&quot;../../../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+        &lt;script&gt;
+        var divTarget;
+        var divScrollPositionBeforeGlide;
+        var divScrollPositionBeforeSnap;
+
+        function checkForScrollSnap() {
+            // The div should have snapped back to the previous position
+            if (divTarget.scrollTop != divScrollPositionBeforeSnap)
+                testFailed(&quot;div did not snap back to proper location.&quot;);
+            else
+                testPassed(&quot;div honored snap points.&quot;);
+
+            testRunner.notifyDone();
+        }
+
+        function scrollSnapTest() {
+            // See where our div lives:
+            pageScrollPositionBefore = document.body.scrollTop;
+
+            divTarget = document.getElementById('target');

+            divScrollPositionBeforeSnap = divTarget.scrollTop;
+
+            var startPosX = divTarget.offsetLeft + 20;
+            var startPosY = divTarget.offsetTop + 20;
+            eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', false);
+            eventSender.callAfterScrollingCompletes(checkForScrollSnap);
+        }
+
+        function checkForScrollGlide() {
+            // The div should have scrolled (glided) to the next snap point.
+            if (divTarget.scrollTop == window.innerHeight)
+                testPassed(&quot;div scrolled to next window.&quot;);
+            else
+                testFailed(&quot;div did not honor snap points.&quot;);
+
+            setTimeout(scrollSnapTest, 0);
+        }
+
+        function scrollGlideTest() {
+            divTarget = document.getElementById('target');

+            divScrollPositionBeforeGlide = divTarget.scrollTop;
+
+            var startPosX = divTarget.offsetLeft + 20;
+            var startPosY = divTarget.offsetTop + 20;
+            eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', false);
+            eventSender.callAfterScrollingCompletes(checkForScrollGlide);
+        }
+
+        function onLoad() {
+
+            if (window.eventSender) {
+                testRunner.waitUntilDone();
+
+                eventSender.monitorWheelEvents();
+                setTimeout(scrollGlideTest, 0);
+            } else {
+                var messageLocation = document.getElementById('item0');
+                var message = document.createElement('div');
+                message.innerHTML = &quot;&lt;p&gt;This test is better run under DumpRenderTree. To manually test it, place the mouse pointer&lt;br/&gt;&quot;
+                    + &quot;inside the red region at the top of the page, and then use the mouse wheel or a two-finger swipe to make a&lt;br/&gt;&quot;
+                    + &quot;small swipe gesture with some momentum.&lt;br/&gt;&lt;br/&gt;&quot;
+                    + &quot;The region should scroll to show a green region.&lt;br/&gt;&lt;br/&gt;&quot;
+                    + &quot;Next, perform a small scroll gesture that does not involve momentum. You should begin to see one of the colors&lt;br/&gt;&quot;
+                    + &quot;to the left (or right) of the current green box. When you release the wheel, the region should scroll back so&lt;br/&gt;&quot;
+                    + &quot;that the region is a single color.&lt;br/&gt;&lt;br/&gt;&quot;
+                    + &quot;You should also be able to repeat these test steps for the vertical region below.&lt;/p&gt;&quot;;
+                messageLocation.appendChild(message);
+            }
+        }
+        &lt;/script&gt;
+    &lt;/head&gt;
+    &lt;body onload=&quot;onLoad();&quot; class=&quot;verticalGallery&quot; id=&quot;target&quot;&gt;
+        &lt;div id=&quot;item0&quot; class=&quot;colorBox&quot;&gt;&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+        &lt;div id=&quot;item1&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+        &lt;div id=&quot;item2&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+        &lt;div id=&quot;item3&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+        &lt;div id=&quot;item4&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+        &lt;div id=&quot;item5&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+        &lt;script src=&quot;../../../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+    &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingscrollsnapscrollsnapmandatorymainframeverticalexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-expected.txt (0 => 183707)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-expected.txt        2015-05-02 01:44:54 UTC (rev 183707)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+PASS successfullyParsed is true
+
+TEST COMPLETE
+PASS div scrolled to next window.
+PASS div honored snap points.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingscrollsnapscrollsnapmandatorymainframeverticalhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html (0 => 183707)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html        2015-05-02 01:44:54 UTC (rev 183707)
</span><span class="lines">@@ -0,0 +1,123 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+    &lt;head&gt;
+        &lt;style&gt;
+            .verticalGallery {
+                width: 100vw;
+                height: 600vh;
+                margin: 0;
+                padding: 0;
+                -webkit-scroll-snap-points-y: repeat(100vh);
+                -webkit-scroll-snap-type: mandatory;
+            }
+            .colorBox {
+                height: 100vh;
+                width: 100vw;
+                float: left;
+            }
+            #item0 { background-color: red; }
+            #item1 { background-color: green; }
+            #item2 { background-color: blue; }
+            #item3 { background-color: aqua; }
+            #item4 { background-color: yellow; }
+            #item5 { background-color: fuchsia; }
+        &lt;/style&gt;
+        &lt;script src=&quot;../../../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+        &lt;script&gt;
+        var divTarget;
+        var divScrollPositionBeforeGlide;
+        var divScrollPositionBeforeSnap;
+
+        function checkForScrollSnap() {
+            // The div should have snapped back to the previous position
+            if (divTarget.scrollTop != divScrollPositionBeforeSnap)
+                testFailed(&quot;div did not snap back to proper location.&quot;);
+            else
+                testPassed(&quot;div honored snap points.&quot;);
+
+            testRunner.notifyDone();
+        }
+
+        function scrollSnapTest() {
+            // See where our div lives:
+            pageScrollPositionBefore = document.body.scrollTop;
+
+            divTarget = document.getElementById('target');

+            divScrollPositionBeforeSnap = divTarget.scrollTop;
+
+            var startPosX = divTarget.offsetLeft + 20;
+            var startPosY = divTarget.offsetTop + 20;
+            eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', false);
+            eventSender.callAfterScrollingCompletes(checkForScrollSnap);
+        }
+
+        function checkForScrollGlide() {
+            // The div should have scrolled (glided) to the next snap point.
+            if (divTarget.scrollTop == window.innerHeight)
+                testPassed(&quot;div scrolled to next window.&quot;);
+            else
+                testFailed(&quot;div did not honor snap points.&quot;);
+
+            setTimeout(scrollSnapTest, 0);
+        }
+
+        function scrollGlideTest() {
+            divTarget = document.getElementById('target');

+            divScrollPositionBeforeGlide = divTarget.scrollTop;
+
+            var startPosX = divTarget.offsetLeft + 20;
+            var startPosY = divTarget.offsetTop + 20;
+            eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the iFrame
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue', false);
+            eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end', false);
+            eventSender.callAfterScrollingCompletes(checkForScrollGlide);
+        }
+
+        function onLoad() {
+
+            if (window.eventSender) {
+                testRunner.waitUntilDone();
+
+                eventSender.monitorWheelEvents();
+                setTimeout(scrollGlideTest, 0);
+            } else {
+                var messageLocation = document.getElementById('item0');
+                var message = document.createElement('div');
+                message.innerHTML = &quot;&lt;p&gt;This test is better run under DumpRenderTree. To manually test it, place the mouse pointer&lt;br/&gt;&quot;
+                    + &quot;inside the red region at the top of the page, and then use the mouse wheel or a two-finger swipe to make a&lt;br/&gt;&quot;
+                    + &quot;small swipe gesture with some momentum.&lt;br/&gt;&lt;br/&gt;&quot;
+                    + &quot;The region should scroll to show a green region.&lt;br/&gt;&lt;br/&gt;&quot;
+                    + &quot;Next, perform a small scroll gesture that does not involve momentum. You should begin to see one of the colors&lt;br/&gt;&quot;
+                    + &quot;to the left (or right) of the current green box. When you release the wheel, the region should scroll back so&lt;br/&gt;&quot;
+                    + &quot;that the region is a single color.&lt;br/&gt;&lt;br/&gt;&quot;
+                    + &quot;You should also be able to repeat these test steps for the vertical region below.&lt;/p&gt;&quot;;
+                messageLocation.appendChild(message);
+            }
+        }
+        &lt;/script&gt;
+    &lt;/head&gt;
+    &lt;body onload=&quot;onLoad();&quot; class=&quot;verticalGallery&quot; id=&quot;target&quot;&gt;
+        &lt;div id=&quot;item0&quot; class=&quot;colorBox&quot;&gt;&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;&lt;/div&gt;
+        &lt;div id=&quot;item1&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+        &lt;div id=&quot;item2&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+        &lt;div id=&quot;item3&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+        &lt;div id=&quot;item4&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+        &lt;div id=&quot;item5&quot; class=&quot;colorBox&quot;&gt;&lt;/div&gt;
+        &lt;script src=&quot;../../../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+    &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre>
</div>
</div>

</body>
</html>