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

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

Issue 1990553002: Remove RenderViewImpl::GetFocusedElement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/WebFrameTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
index ed3ada6ab9daec595de2171ade8c486bfb60feaf..6c306aa61bb1d1a22877bf753cfc7d0908eb9e5c 100644
--- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
@@ -2945,6 +2945,7 @@ TEST_F(WebFrameTest, DontZoomInOnFocusedInTouchAction)
{
registerMockedHttpURLLoad("textbox_in_touch_action.html");
+ bool willAnimate;
int viewportWidth = 600;
int viewportHeight = 1000;
@@ -2961,7 +2962,7 @@ TEST_F(WebFrameTest, DontZoomInOnFocusedInTouchAction)
// Focus the first textbox that's in a touch-action: pan-x ancestor, this
// shouldn't cause an autozoom since pan-x disables pinch-zoom.
webViewHelper.webViewImpl()->advanceFocus(false);
- webViewHelper.webViewImpl()->scrollFocusedNodeIntoRect(WebRect());
+ webViewHelper.webViewImpl()->scrollFocusedEditableElementIntoRect(WebRect(), willAnimate);
EXPECT_EQ(webViewHelper.webViewImpl()->fakePageScaleAnimationPageScaleForTesting(), 0);
setScaleAndScrollAndLayout(webViewHelper.webViewImpl(), WebPoint(0, 0), initialScale);
@@ -2970,7 +2971,7 @@ TEST_F(WebFrameTest, DontZoomInOnFocusedInTouchAction)
// Focus the second textbox that's in a touch-action: manipulation ancestor,
// this should cause an autozoom since it allows pinch-zoom.
webViewHelper.webViewImpl()->advanceFocus(false);
- webViewHelper.webViewImpl()->scrollFocusedNodeIntoRect(WebRect());
+ webViewHelper.webViewImpl()->scrollFocusedEditableElementIntoRect(WebRect(), willAnimate);
EXPECT_GT(webViewHelper.webViewImpl()->fakePageScaleAnimationPageScaleForTesting(), initialScale);
setScaleAndScrollAndLayout(webViewHelper.webViewImpl(), WebPoint(0, 0), initialScale);
@@ -2980,7 +2981,7 @@ TEST_F(WebFrameTest, DontZoomInOnFocusedInTouchAction)
// should cause an autozoom since it's seperated from the node with the
// touch-action by an overflow:scroll element.
webViewHelper.webView()->advanceFocus(false);
- webViewHelper.webViewImpl()->scrollFocusedNodeIntoRect(WebRect());
+ webViewHelper.webViewImpl()->scrollFocusedEditableElementIntoRect(WebRect(), willAnimate);
EXPECT_GT(webViewHelper.webViewImpl()->fakePageScaleAnimationPageScaleForTesting(), initialScale);
}

Powered by Google App Engine
This is Rietveld 408576698