Roll src/third_party/WebKit 6cdd902:94953d6 (svn 197985:197991)
[chromium-blink-merge.git] / content / browser / web_contents / web_contents_view_aura_unittest.cc
blob504ac2b6914a1623d386f7b5a6bcd1c0eeafe409
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"
11 namespace content {
13 class WebContentsViewAuraTest : public RenderViewHostTestHarness {
14 public:
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