1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "content/browser/web_contents/web_contents_view_aura.h"
7 #include "content/browser/web_contents/web_contents_impl.h"
8 #include "content/public/test/test_renderer_host.h"
9 #include "testing/gtest/include/gtest/gtest.h"
13 class WebContentsViewAuraTest
: public RenderViewHostTestHarness
{
15 WebContentsViewAuraTest() {}
16 ~WebContentsViewAuraTest() override
{}
18 WebContentsViewAura
* view() {
19 WebContentsImpl
* contents
= static_cast<WebContentsImpl
*>(web_contents());
20 return static_cast<WebContentsViewAura
*>(contents
->GetView());
24 TEST_F(WebContentsViewAuraTest
, EnableDisableOverscroll
) {
25 WebContentsViewAura
* wcva
= view();
26 wcva
->SetOverscrollControllerEnabled(false);
27 EXPECT_FALSE(wcva
->navigation_overlay_
);
28 wcva
->SetOverscrollControllerEnabled(true);
29 EXPECT_TRUE(wcva
->navigation_overlay_
);
32 } // namespace content