<!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>[129225] trunk/Source</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/129225">129225</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2012-09-21 07:11:27 -0700 (Fri, 21 Sep 2012)</dd>
</dl>

<h3>Log Message</h3>
<pre>[chromium] Add test for ScrollingCoordinatorChromium
https://bugs.webkit.org/show_bug.cgi?id=96657

Patch by Sami Kyostila &lt;skyostil@chromium.org&gt; on 2012-09-21
Reviewed by James Robinson.

Add tests for ScrollingCoordinatorChromium. These tests mainly verify that
fast (non-main thread) scrolling is enabled when necessary and that a proper
compositing layer structure is created for fixed position and accelerated
scrolling layers.

Tests: ScrollingCoordinatorChromiumTest.fastScrollingByDefault
       ScrollingCoordinatorChromiumTest.fastScrollingForFixedPosition
       ScrollingCoordinatorChromiumTest.nonFastScrollableRegion
       ScrollingCoordinatorChromiumTest.wheelEventHandler
       ScrollingCoordinatorChromiumTest.touchOverflowScrolling

* WebKit.gypi:
* tests/ScrollingCoordinatorChromiumTest.cpp: Added.
(WebKit):
(MockWebViewClient):
(ScrollingCoordinatorChromiumTest):
(WebKit::ScrollingCoordinatorChromiumTest::ScrollingCoordinatorChromiumTest):
(WebKit::ScrollingCoordinatorChromiumTest::createCompositedWebViewImpl):
(WebKit::ScrollingCoordinatorChromiumTest::registerMockedHttpURLLoad):
(WebKit::ScrollingCoordinatorChromiumTest::getRootScrollLayer):
(WebKit::TEST_F):
* tests/data/fixed_position.html: Added.
* tests/data/non_fast_scrollable.html: Added.
* tests/data/touch_overflow_scrolling.html: Added.
* tests/data/wheel_event_handler.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourcePlatformchromiumpublicWebLayerh">trunk/Source/Platform/chromium/public/WebLayer.h</a></li>
<li><a href="#trunkSourceWebKitchromiumChangeLog">trunk/Source/WebKit/chromium/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitchromiumWebKitgyp">trunk/Source/WebKit/chromium/WebKit.gyp</a></li>
<li><a href="#trunkSourceWebKitchromiumWebKitgypi">trunk/Source/WebKit/chromium/WebKit.gypi</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKitchromiumtestsScrollingCoordinatorChromiumTestcpp">trunk/Source/WebKit/chromium/tests/ScrollingCoordinatorChromiumTest.cpp</a></li>
<li><a href="#trunkSourceWebKitchromiumtestsdatafixedpositionhtml">trunk/Source/WebKit/chromium/tests/data/fixed-position.html</a></li>
<li><a href="#trunkSourceWebKitchromiumtestsdatanonfastscrollablehtml">trunk/Source/WebKit/chromium/tests/data/non-fast-scrollable.html</a></li>
<li><a href="#trunkSourceWebKitchromiumtestsdatatouchoverflowscrollinghtml">trunk/Source/WebKit/chromium/tests/data/touch-overflow-scrolling.html</a></li>
<li><a href="#trunkSourceWebKitchromiumtestsdatawheeleventhandlerhtml">trunk/Source/WebKit/chromium/tests/data/wheel-event-handler.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourcePlatformchromiumpublicWebLayerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/Platform/chromium/public/WebLayer.h (129224 => 129225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/Platform/chromium/public/WebLayer.h        2012-09-21 14:05:36 UTC (rev 129224)
+++ trunk/Source/Platform/chromium/public/WebLayer.h        2012-09-21 14:11:27 UTC (rev 129225)
</span><span class="lines">@@ -169,12 +169,25 @@
</span><span class="cx">     virtual WebPoint scrollPosition() const = 0;
</span><span class="cx"> 
</span><span class="cx">     virtual void setMaxScrollPosition(WebSize) = 0;
</span><ins>+    virtual WebSize maxScrollPosition() const = 0;
+
</ins><span class="cx">     virtual void setScrollable(bool) = 0;
</span><ins>+    virtual bool scrollable() const = 0;
+
</ins><span class="cx">     virtual void setHaveWheelEventHandlers(bool) = 0;
</span><ins>+    virtual bool haveWheelEventHandlers() const = 0;
+
</ins><span class="cx">     virtual void setShouldScrollOnMainThread(bool) = 0;
</span><ins>+    virtual bool shouldScrollOnMainThread() const = 0;
+
</ins><span class="cx">     virtual void setNonFastScrollableRegion(const WebVector&lt;WebRect&gt;&amp;) = 0;
</span><ins>+    virtual WebVector&lt;WebRect&gt; nonFastScrollableRegion() const = 0;
+
</ins><span class="cx">     virtual void setIsContainerForFixedPositionLayers(bool) = 0;
</span><ins>+    virtual bool isContainerForFixedPositionLayers() const = 0;
+
</ins><span class="cx">     virtual void setFixedToContainerLayer(bool) = 0;
</span><ins>+    virtual bool fixedToContainerLayer() const = 0;
</ins><span class="cx"> 
</span><span class="cx">     // The scroll client is notified when the scroll position of the WebLayer
</span><span class="cx">     // changes. Only a single scroll client can be set for a WebLayer at a time.
</span></span></pre></div>
<a id="trunkSourceWebKitchromiumChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/chromium/ChangeLog (129224 => 129225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/chromium/ChangeLog        2012-09-21 14:05:36 UTC (rev 129224)
+++ trunk/Source/WebKit/chromium/ChangeLog        2012-09-21 14:11:27 UTC (rev 129225)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2012-09-21  Sami Kyostila  &lt;skyostil@chromium.org&gt;
+
+        [chromium] Add test for ScrollingCoordinatorChromium
+        https://bugs.webkit.org/show_bug.cgi?id=96657
+
+        Reviewed by James Robinson.
+
+        Add tests for ScrollingCoordinatorChromium. These tests mainly verify that
+        fast (non-main thread) scrolling is enabled when necessary and that a proper
+        compositing layer structure is created for fixed position and accelerated
+        scrolling layers.
+
+        Tests: ScrollingCoordinatorChromiumTest.fastScrollingByDefault
+               ScrollingCoordinatorChromiumTest.fastScrollingForFixedPosition
+               ScrollingCoordinatorChromiumTest.nonFastScrollableRegion
+               ScrollingCoordinatorChromiumTest.wheelEventHandler
+               ScrollingCoordinatorChromiumTest.touchOverflowScrolling
+
+        * WebKit.gypi:
+        * tests/ScrollingCoordinatorChromiumTest.cpp: Added.
+        (WebKit):
+        (MockWebViewClient):
+        (ScrollingCoordinatorChromiumTest):
+        (WebKit::ScrollingCoordinatorChromiumTest::ScrollingCoordinatorChromiumTest):
+        (WebKit::ScrollingCoordinatorChromiumTest::createCompositedWebViewImpl):
+        (WebKit::ScrollingCoordinatorChromiumTest::registerMockedHttpURLLoad):
+        (WebKit::ScrollingCoordinatorChromiumTest::getRootScrollLayer):
+        (WebKit::TEST_F):
+        * tests/data/fixed_position.html: Added.
+        * tests/data/non_fast_scrollable.html: Added.
+        * tests/data/touch_overflow_scrolling.html: Added.
+        * tests/data/wheel_event_handler.html: Added.
+
</ins><span class="cx"> 2012-09-20  Peter Beverloo  &lt;peter@chromium.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Leverage Chromium's code to set up FIFOs for Chromium Android layout tests
</span></span></pre></div>
<a id="trunkSourceWebKitchromiumWebKitgyp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/chromium/WebKit.gyp (129224 => 129225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/chromium/WebKit.gyp        2012-09-21 14:05:36 UTC (rev 129224)
+++ trunk/Source/WebKit/chromium/WebKit.gyp        2012-09-21 14:11:27 UTC (rev 129225)
</span><span class="lines">@@ -714,6 +714,7 @@
</span><span class="cx">                                 'tests/PopupMenuTest.cpp',
</span><span class="cx">                                 'tests/RenderTableCellTest.cpp',
</span><span class="cx">                                 'tests/RenderTableRowTest.cpp',
</span><ins>+                                'tests/ScrollingCoordinatorChromiumTest.cpp',
</ins><span class="cx">                                 'tests/URLTestHelpers.cpp',
</span><span class="cx">                                 'tests/WebFrameTest.cpp',
</span><span class="cx">                                 'tests/WebImageTest.cpp',
</span></span></pre></div>
<a id="trunkSourceWebKitchromiumWebKitgypi"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/chromium/WebKit.gypi (129224 => 129225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/chromium/WebKit.gypi        2012-09-21 14:05:36 UTC (rev 129224)
+++ trunk/Source/WebKit/chromium/WebKit.gypi        2012-09-21 14:11:27 UTC (rev 129225)
</span><span class="lines">@@ -97,6 +97,7 @@
</span><span class="cx">             'tests/RegionTest.cpp',
</span><span class="cx">             'tests/RenderTableCellTest.cpp',
</span><span class="cx">             'tests/RenderTableRowTest.cpp',
</span><ins>+            'tests/ScrollingCoordinatorChromiumTest.cpp',
</ins><span class="cx">             'tests/TilingDataTest.cpp',
</span><span class="cx">             'tests/TreeTestHelpers.cpp',
</span><span class="cx">             'tests/TreeTestHelpers.h',
</span></span></pre></div>
<a id="trunkSourceWebKitchromiumtestsScrollingCoordinatorChromiumTestcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit/chromium/tests/ScrollingCoordinatorChromiumTest.cpp (0 => 129225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/chromium/tests/ScrollingCoordinatorChromiumTest.cpp                                (rev 0)
+++ trunk/Source/WebKit/chromium/tests/ScrollingCoordinatorChromiumTest.cpp        2012-09-21 14:11:27 UTC (rev 129225)
</span><span class="lines">@@ -0,0 +1,217 @@
</span><ins>+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+
+#include &quot;ScrollingCoordinator.h&quot;
+
+#include &quot;CompositorFakeWebGraphicsContext3D.h&quot;
+#include &quot;FakeWebCompositorOutputSurface.h&quot;
+#include &quot;FrameTestHelpers.h&quot;
+#include &quot;RenderLayerCompositor.h&quot;
+#include &quot;RenderView.h&quot;
+#include &quot;URLTestHelpers.h&quot;
+#include &quot;WebCompositorInitializer.h&quot;
+#include &quot;WebFrameClient.h&quot;
+#include &quot;WebFrameImpl.h&quot;
+#include &quot;WebSettings.h&quot;
+#include &quot;WebViewClient.h&quot;
+#include &quot;WebViewImpl.h&quot;
+#include &lt;gtest/gtest.h&gt;
+#include &lt;public/WebCompositorSupport.h&gt;
+#include &lt;public/WebLayer.h&gt;
+#include &lt;webkit/support/webkit_support.h&gt;
+
+#if ENABLE(ACCELERATED_OVERFLOW_SCROLLING)
+#include &quot;GraphicsLayerChromium.h&quot;
+#endif
+
+using namespace WebCore;
+using namespace WebKit;
+
+namespace {
+
+class MockWebViewClient : public WebViewClient {
+public:
+    virtual WebCompositorOutputSurface* createOutputSurface() OVERRIDE
+    {
+        return FakeWebCompositorOutputSurface::create(CompositorFakeWebGraphicsContext3D::create(WebGraphicsContext3D::Attributes())).leakPtr();
+    }
+};
+
+class MockWebFrameClient : public WebFrameClient {
+};
+
+class ScrollingCoordinatorChromiumTest : public testing::Test {
+public:
+    ScrollingCoordinatorChromiumTest()
+        : m_baseURL(&quot;http://www.test.com/&quot;)
+        , m_webCompositorInitializer(0)
+    {
+        // We cannot reuse FrameTestHelpers::createWebViewAndLoad here because the compositing
+        // settings need to be set before the page is loaded.
+        m_webViewImpl = static_cast&lt;WebViewImpl*&gt;(WebView::create(&amp;m_mockWebViewClient));
+        m_webViewImpl-&gt;settings()-&gt;setJavaScriptEnabled(true);
+        m_webViewImpl-&gt;settings()-&gt;setForceCompositingMode(true);
+        m_webViewImpl-&gt;settings()-&gt;setAcceleratedCompositingEnabled(true);
+        m_webViewImpl-&gt;settings()-&gt;setAcceleratedCompositingForFixedPositionEnabled(true);
+        m_webViewImpl-&gt;settings()-&gt;setFixedPositionCreatesStackingContext(true);
+        m_webViewImpl-&gt;initializeMainFrame(&amp;m_mockWebFrameClient);
+        m_webViewImpl-&gt;resize(IntSize(320, 240));
+    }
+
+    virtual ~ScrollingCoordinatorChromiumTest()
+    {
+        webkit_support::UnregisterAllMockedURLs();
+        m_webViewImpl-&gt;close();
+    }
+
+    void navigateTo(const std::string&amp; url)
+    {
+        FrameTestHelpers::loadFrame(m_webViewImpl-&gt;mainFrame(), url);
+        webkit_support::ServeAsynchronousMockedRequests();
+    }
+
+    void registerMockedHttpURLLoad(const std::string&amp; fileName)
+    {
+        URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c_str()), WebString::fromUTF8(fileName.c_str()));
+    }
+
+    WebLayer* getRootScrollLayer()
+    {
+        RenderLayerCompositor* compositor = m_webViewImpl-&gt;mainFrameImpl()-&gt;frame()-&gt;contentRenderer()-&gt;compositor();
+        ASSERT(compositor);
+        ASSERT(compositor-&gt;scrollLayer());
+
+        WebLayer* webScrollLayer = static_cast&lt;WebLayer*&gt;(compositor-&gt;scrollLayer()-&gt;platformLayer());
+        return webScrollLayer;
+    }
+
+protected:
+    std::string m_baseURL;
+    MockWebFrameClient m_mockWebFrameClient;
+    MockWebViewClient m_mockWebViewClient;
+    WebKitTests::WebCompositorInitializer m_webCompositorInitializer;
+    WebViewImpl* m_webViewImpl;
+};
+
+TEST_F(ScrollingCoordinatorChromiumTest, fastScrollingByDefault)
+{
+    navigateTo(&quot;about:blank&quot;);
+
+    // Make sure the scrolling coordinator is active.
+    FrameView* frameView = m_webViewImpl-&gt;mainFrameImpl()-&gt;frameView();
+    Page* page = m_webViewImpl-&gt;mainFrameImpl()-&gt;frame()-&gt;page();
+    ASSERT_TRUE(page-&gt;scrollingCoordinator());
+    ASSERT_TRUE(page-&gt;scrollingCoordinator()-&gt;coordinatesScrollingForFrameView(frameView));
+
+    // Fast scrolling should be enabled by default.
+    WebLayer* rootScrollLayer = getRootScrollLayer();
+    ASSERT_TRUE(rootScrollLayer-&gt;scrollable());
+    ASSERT_FALSE(rootScrollLayer-&gt;shouldScrollOnMainThread());
+    ASSERT_FALSE(rootScrollLayer-&gt;haveWheelEventHandlers());
+}
+
+TEST_F(ScrollingCoordinatorChromiumTest, fastScrollingForFixedPosition)
+{
+    registerMockedHttpURLLoad(&quot;fixed-position.html&quot;);
+    navigateTo(m_baseURL + &quot;fixed-position.html&quot;);
+
+    Page* page = m_webViewImpl-&gt;mainFrameImpl()-&gt;frame()-&gt;page();
+    ASSERT_TRUE(page-&gt;scrollingCoordinator()-&gt;supportsFixedPositionLayers());
+
+    // Fixed position should not fall back to main thread scrolling.
+    WebLayer* rootScrollLayer = getRootScrollLayer();
+    ASSERT_FALSE(rootScrollLayer-&gt;shouldScrollOnMainThread());
+
+    // Verify the properties of the fixed position element starting from the RenderObject all the
+    // way to the WebLayer.
+    Element* fixedElement = m_webViewImpl-&gt;mainFrameImpl()-&gt;frame()-&gt;document()-&gt;getElementById(&quot;fixed&quot;);
+    ASSERT(fixedElement);
+
+    RenderObject* renderer = fixedElement-&gt;renderer();
+    ASSERT_TRUE(renderer-&gt;isBoxModelObject());
+    ASSERT_TRUE(renderer-&gt;hasLayer());
+
+    RenderLayer* layer = toRenderBoxModelObject(renderer)-&gt;layer();
+    ASSERT_TRUE(layer-&gt;isComposited());
+
+    RenderLayerBacking* layerBacking = layer-&gt;backing();
+    WebLayer* webLayer = static_cast&lt;WebLayer*&gt;(layerBacking-&gt;graphicsLayer()-&gt;platformLayer());
+    ASSERT_TRUE(webLayer-&gt;fixedToContainerLayer());
+}
+
+TEST_F(ScrollingCoordinatorChromiumTest, nonFastScrollableRegion)
+{
+    registerMockedHttpURLLoad(&quot;non-fast-scrollable.html&quot;);
+    navigateTo(m_baseURL + &quot;non-fast-scrollable.html&quot;);
+
+    WebLayer* rootScrollLayer = getRootScrollLayer();
+    WebVector&lt;WebRect&gt; nonFastScrollableRegion = rootScrollLayer-&gt;nonFastScrollableRegion();
+
+    ASSERT_EQ(1u, nonFastScrollableRegion.size());
+    ASSERT_EQ(WebRect(8, 8, 10, 10), nonFastScrollableRegion[0]);
+}
+
+TEST_F(ScrollingCoordinatorChromiumTest, wheelEventHandler)
+{
+    registerMockedHttpURLLoad(&quot;wheel-event-handler.html&quot;);
+    navigateTo(m_baseURL + &quot;wheel-event-handler.html&quot;);
+
+    WebLayer* rootScrollLayer = getRootScrollLayer();
+    ASSERT_TRUE(rootScrollLayer-&gt;haveWheelEventHandlers());
+}
+
+#if ENABLE(ACCELERATED_OVERFLOW_SCROLLING)
+TEST_F(ScrollingCoordinatorChromiumTest, touchOverflowScrolling)
+{
+    registerMockedHttpURLLoad(&quot;touch-overflow-scrolling.html&quot;);
+    navigateTo(m_baseURL + &quot;touch-overflow-scrolling.html&quot;);
+
+    // Verify the properties of the accelerated scrolling element starting from the RenderObject
+    // all the way to the WebLayer.
+    Element* scrollableElement = m_webViewImpl-&gt;mainFrameImpl()-&gt;frame()-&gt;document()-&gt;getElementById(&quot;scrollable&quot;);
+    ASSERT(scrollableElement);
+
+    RenderObject* renderer = scrollableElement-&gt;renderer();
+    ASSERT_TRUE(renderer-&gt;isBoxModelObject());
+    ASSERT_TRUE(renderer-&gt;hasLayer());
+
+    RenderLayer* layer = toRenderBoxModelObject(renderer)-&gt;layer();
+    ASSERT_TRUE(layer-&gt;usesCompositedScrolling());
+    ASSERT_TRUE(layer-&gt;isComposited());
+
+    RenderLayerBacking* layerBacking = layer-&gt;backing();
+    ASSERT_TRUE(layerBacking-&gt;hasScrollingLayer());
+    ASSERT(layerBacking-&gt;scrollingContentsLayer());
+
+    GraphicsLayerChromium* graphicsLayerChromium = static_cast&lt;GraphicsLayerChromium*&gt;(layerBacking-&gt;scrollingContentsLayer());
+    ASSERT_EQ(layer, graphicsLayerChromium-&gt;scrollableArea());
+
+    WebLayer* webScrollLayer = static_cast&lt;WebLayer*&gt;(layerBacking-&gt;scrollingContentsLayer()-&gt;platformLayer());
+    ASSERT_TRUE(webScrollLayer-&gt;scrollable());
+}
+#endif // ENABLE(ACCELERATED_OVERFLOW_SCROLLING)
+
+} // namespace
</ins></span></pre></div>
<a id="trunkSourceWebKitchromiumtestsdatafixedpositionhtml"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit/chromium/tests/data/fixed-position.html (0 => 129225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/chromium/tests/data/fixed-position.html                                (rev 0)
+++ trunk/Source/WebKit/chromium/tests/data/fixed-position.html        2012-09-21 14:11:27 UTC (rev 129225)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+  &lt;style type=&quot;text/css&quot;&gt;
+    #fixed {
+      position: fixed;
+    }
+  &lt;/style&gt;
+&lt;/head&gt;
+
+&lt;body&gt;
+  &lt;div id=&quot;fixed&quot;&gt;
+    Fixed positioned.
+  &lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkSourceWebKitchromiumtestsdatanonfastscrollablehtml"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit/chromium/tests/data/non-fast-scrollable.html (0 => 129225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/chromium/tests/data/non-fast-scrollable.html                                (rev 0)
+++ trunk/Source/WebKit/chromium/tests/data/non-fast-scrollable.html        2012-09-21 14:11:27 UTC (rev 129225)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+  &lt;style type=&quot;text/css&quot;&gt;
+    .scrollable {
+      width: 10px;
+      height: 10px;
+      overflow: scroll;
+    }
+  &lt;/style&gt;
+&lt;/head&gt;
+
+&lt;body&gt;
+  &lt;div class=&quot;scrollable&quot;&gt;
+    Scrolling content.
+  &lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkSourceWebKitchromiumtestsdatatouchoverflowscrollinghtml"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit/chromium/tests/data/touch-overflow-scrolling.html (0 => 129225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/chromium/tests/data/touch-overflow-scrolling.html                                (rev 0)
+++ trunk/Source/WebKit/chromium/tests/data/touch-overflow-scrolling.html        2012-09-21 14:11:27 UTC (rev 129225)
</span><span class="lines">@@ -0,0 +1,23 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+  &lt;style type=&quot;text/css&quot;&gt;
+    #scrollable {
+      width: 10px;
+      height: 10px;
+      overflow: scroll;
+      -webkit-overflow-scrolling: touch;
+    }
+    .content {
+      width: 100px;
+      height: 1000px;
+    }
+  &lt;/style&gt;
+&lt;/head&gt;
+
+&lt;body&gt;
+  &lt;div id=&quot;scrollable&quot;&gt;
+    &lt;div class=&quot;content&quot;&gt;&lt;/div&gt;
+  &lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkSourceWebKitchromiumtestsdatawheeleventhandlerhtml"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit/chromium/tests/data/wheel-event-handler.html (0 => 129225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/chromium/tests/data/wheel-event-handler.html                                (rev 0)
+++ trunk/Source/WebKit/chromium/tests/data/wheel-event-handler.html        2012-09-21 14:11:27 UTC (rev 129225)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+  &lt;script type=&quot;text/javascript&quot;&gt;
+      window.addEventListener('mousewheel', function(event) {
+      });
+  &lt;/script&gt;
+&lt;/head&gt;
+
+&lt;/html&gt;
</ins></span></pre>
</div>
</div>

</body>
</html>