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

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

Issue 1844013002: Fix main thread top controls scrolling to mirror CC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@propertyTreesBoundsDelta
Patch Set: Fixed anchoring to check width too Created 4 years, 8 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 e71a7f6d33dfcd09f0b8bc6fe0f9fa5ea17b6e28..4314d2a0a3c42bc7b21723628b4a2a41c501ce2e 100644
--- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
@@ -6432,8 +6432,7 @@ TEST_F(WebFrameTest, FrameViewScrollAccountsForTopControls)
FrameView* frameView = webViewHelper.webViewImpl()->mainFrameImpl()->frameView();
float topControlsHeight = 40;
- webView->setTopControlsHeight(topControlsHeight, false);
- webViewHelper.resize(WebSize(100, 100));
+ webView->resize(WebSize(100, 100), topControlsHeight, false);
webView->setPageScaleFactor(2.0f);
webView->updateAllLifecyclePhases();
@@ -6458,8 +6457,7 @@ TEST_F(WebFrameTest, FrameViewScrollAccountsForTopControls)
// the top controls and Blink's view of the top controls matches that of
// the CC
webView->applyViewportDeltas(WebFloatSize(), WebFloatSize(), WebFloatSize(), 1.0f, 30.0f / topControlsHeight);
- webView->setTopControlsHeight(40.0f, true);
- webViewHelper.resize(WebSize(100, 60));
+ webView->resize(WebSize(100, 60), 40.0f, true);
webView->updateAllLifecyclePhases();
EXPECT_POINT_EQ(IntPoint(0, 1940), frameView->maximumScrollPosition());
@@ -6469,8 +6467,7 @@ TEST_F(WebFrameTest, FrameViewScrollAccountsForTopControls)
// Reset to original state: 100px widget height, top controls fully hidden.
webView->applyViewportDeltas(WebFloatSize(), WebFloatSize(), WebFloatSize(), 1.0f, -30.0f / topControlsHeight);
- webView->setTopControlsHeight(topControlsHeight, false);
- webViewHelper.resize(WebSize(100, 100));
+ webView->resize(WebSize(100, 100), topControlsHeight, false);
webView->updateAllLifecyclePhases();
EXPECT_POINT_EQ(IntPoint(0, 1900), frameView->maximumScrollPosition());

Powered by Google App Engine
This is Rietveld 408576698