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

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

Issue 2105523002: Don't set shownRatio in main thread top controls on animated state change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/TopControlsTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/TopControlsTest.cpp b/third_party/WebKit/Source/web/tests/TopControlsTest.cpp
index a179c520e1466633709cfc736c74f20afa421c3e..26c14ff753d8ccf7f77ce3cc0b857037bd7cabc4 100644
--- a/third_party/WebKit/Source/web/tests/TopControlsTest.cpp
+++ b/third_party/WebKit/Source/web/tests/TopControlsTest.cpp
@@ -559,6 +559,14 @@ TEST_F(TopControlsTest, MAYBE(StateConstraints))
EXPECT_FLOAT_EQ(20, webView->topControls().contentOffset());
webView->updateTopControlsState(WebTopControlsBoth, WebTopControlsBoth, false);
EXPECT_FLOAT_EQ(20, webView->topControls().contentOffset());
+
+ // An animated state change shouldn't cause a change to the content offset
+ // since it'll be driven from the compositor.
+ webView->updateTopControlsState(WebTopControlsHidden, WebTopControlsHidden, true);
+ EXPECT_FLOAT_EQ(20, webView->topControls().contentOffset());
+
+ webView->updateTopControlsState(WebTopControlsShown, WebTopControlsShown, true);
+ EXPECT_FLOAT_EQ(20, webView->topControls().contentOffset());
}
// Ensure that top controls do not affect the layout by showing and hiding

Powered by Google App Engine
This is Rietveld 408576698