Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(496)

Unified Diff: third_party/WebKit/Source/web/tests/RootScrollerTest.cpp

Issue 2443613002: Rename classes related to top controls (Closed)
Patch Set: fix test Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/tests/RootScrollerTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/RootScrollerTest.cpp b/third_party/WebKit/Source/web/tests/RootScrollerTest.cpp
index 9ab0e78842413bc8c57d446ee90d6f1588b75dd0..f510c5002ab999a9107adc0477379b293c0adc38 100644
--- a/third_party/WebKit/Source/web/tests/RootScrollerTest.cpp
+++ b/third_party/WebKit/Source/web/tests/RootScrollerTest.cpp
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "core/frame/BrowserControls.h"
#include "core/frame/FrameHost.h"
#include "core/frame/FrameView.h"
#include "core/frame/RootFrameViewport.h"
-#include "core/frame/TopControls.h"
#include "core/html/HTMLFrameOwnerElement.h"
#include "core/layout/LayoutBox.h"
#include "core/layout/api/LayoutViewItem.h"
@@ -58,9 +58,9 @@ class RootScrollerTest : public ::testing::Test {
m_helper.initializeAndLoad(m_baseURL + pageName, true, nullptr, client,
nullptr, &configureSettings);
- // Initialize top controls to be shown.
- webViewImpl()->resizeWithTopControls(IntSize(400, 400), 50, true);
- webViewImpl()->topControls().setShownRatio(1);
+ // Initialize browser controls to be shown.
+ webViewImpl()->resizeWithBrowserControls(IntSize(400, 400), 50, true);
+ webViewImpl()->browserControls().setShownRatio(1);
mainFrameView()->updateAllLifecyclePhases();
@@ -114,7 +114,9 @@ class RootScrollerTest : public ::testing::Test {
return frameHost().visualViewport();
}
- TopControls& topControls() const { return frameHost().topControls(); }
+ BrowserControls& browserControls() const {
+ return frameHost().browserControls();
+ }
Element* effectiveRootScroller(Document* doc) const {
return doc->rootScrollerController()->effectiveRootScroller();
@@ -195,12 +197,12 @@ TEST_F(RootScrollerTest, TestSetRootScroller) {
generateTouchGestureEvent(WebInputEvent::GestureScrollBegin));
{
- // Scrolling over the #container DIV should cause the top controls to
+ // Scrolling over the #container DIV should cause the browser controls to
// hide.
- EXPECT_FLOAT_EQ(1, topControls().shownRatio());
+ EXPECT_FLOAT_EQ(1, browserControls().shownRatio());
webViewImpl()->handleInputEvent(generateTouchGestureEvent(
- WebInputEvent::GestureScrollUpdate, 0, -topControls().height()));
- EXPECT_FLOAT_EQ(0, topControls().shownRatio());
+ WebInputEvent::GestureScrollUpdate, 0, -browserControls().height()));
+ EXPECT_FLOAT_EQ(0, browserControls().shownRatio());
}
{
@@ -256,14 +258,14 @@ TEST_F(RootScrollerTest, TestSetRootScroller) {
}
{
- // Scrolling up should show the top controls.
+ // Scrolling up should show the browser controls.
webViewImpl()->handleInputEvent(
generateTouchGestureEvent(WebInputEvent::GestureScrollBegin));
- EXPECT_FLOAT_EQ(0, topControls().shownRatio());
+ EXPECT_FLOAT_EQ(0, browserControls().shownRatio());
webViewImpl()->handleInputEvent(
generateTouchGestureEvent(WebInputEvent::GestureScrollUpdate, 0, 30));
- EXPECT_FLOAT_EQ(0.6, topControls().shownRatio());
+ EXPECT_FLOAT_EQ(0.6, browserControls().shownRatio());
webViewImpl()->handleInputEvent(
generateTouchGestureEvent(WebInputEvent::GestureScrollEnd));
« no previous file with comments | « third_party/WebKit/Source/web/tests/BrowserControlsTest.cpp ('k') | third_party/WebKit/Source/web/tests/TopControlsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698