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

Unified Diff: ui/views/controls/scroll_view_unittest.cc

Issue 2520433003: Fix event targeting for overlay scrollbar thumbs (in native UI). (Closed)
Patch Set: remove circular construction dependency Created 4 years, 1 month 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
« no previous file with comments | « no previous file | ui/views/controls/scrollbar/base_scroll_bar.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/scroll_view_unittest.cc
diff --git a/ui/views/controls/scroll_view_unittest.cc b/ui/views/controls/scroll_view_unittest.cc
index ceb28b5fb7030a1370fcb26efedb7edb8d3c687c..c4a5ca7a113e2e57dbf6818529af58591afd501c 100644
--- a/ui/views/controls/scroll_view_unittest.cc
+++ b/ui/views/controls/scroll_view_unittest.cc
@@ -532,15 +532,13 @@ TEST_F(ScrollViewTest, HeaderScrollsWithContent) {
// Scroll the horizontal scrollbar.
ASSERT_TRUE(scroll_view_.horizontal_scroll_bar());
- scroll_view_.ScrollToPosition(
- const_cast<ScrollBar*>(scroll_view_.horizontal_scroll_bar()), 1);
+ scroll_view_.ScrollToPosition(test_api.GetBaseScrollBar(HORIZONTAL), 1);
EXPECT_EQ("-1,0", test_api.IntegralViewOffset().ToString());
EXPECT_EQ("-1,0", header->bounds().origin().ToString());
// Scrolling the vertical scrollbar shouldn't effect the header.
ASSERT_TRUE(scroll_view_.vertical_scroll_bar());
- scroll_view_.ScrollToPosition(
- const_cast<ScrollBar*>(scroll_view_.vertical_scroll_bar()), 1);
+ scroll_view_.ScrollToPosition(test_api.GetBaseScrollBar(VERTICAL), 1);
EXPECT_EQ("-1,-1", test_api.IntegralViewOffset().ToString());
EXPECT_EQ("-1,0", header->bounds().origin().ToString());
}
@@ -883,8 +881,7 @@ TEST_F(ScrollViewTest, ContentScrollNotResetOnLayout) {
EXPECT_EQ(gfx::Size(300, 150), scroll_view_.size());
// Scroll down.
- scroll_view_.ScrollToPosition(
- const_cast<ScrollBar*>(scroll_view_.vertical_scroll_bar()), 25);
+ scroll_view_.ScrollToPosition(test_api.GetBaseScrollBar(VERTICAL), 25);
EXPECT_EQ(25, test_api.CurrentOffset().y());
// Call Layout; no change to scroll position.
scroll_view_.Layout();
« no previous file with comments | « no previous file | ui/views/controls/scrollbar/base_scroll_bar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698