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

Unified Diff: cc/layers/scrollbar_layer_unittest.cc

Issue 1372253002: gfx: Make conversions from gfx::Point to PointF explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pointfconvert-gfx: . Created 5 years, 3 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: cc/layers/scrollbar_layer_unittest.cc
diff --git a/cc/layers/scrollbar_layer_unittest.cc b/cc/layers/scrollbar_layer_unittest.cc
index 8fa66b1d48542c3a15bca14d8253d93fb30a4710..410ee573b6ba32ade05f2184710f957bab2c107c 100644
--- a/cc/layers/scrollbar_layer_unittest.cc
+++ b/cc/layers/scrollbar_layer_unittest.cc
@@ -188,10 +188,9 @@ TEST_F(ScrollbarLayerTest, ShouldScrollNonOverlayOnMainThread) {
// When the scrollbar is not an overlay scrollbar, the scroll should be
// responded to on the main thread as the compositor does not yet implement
// scrollbar scrolling.
- EXPECT_EQ(
- InputHandler::SCROLL_ON_MAIN_THREAD,
- scrollbar_layer_impl->TryScroll(gfx::Point(0, 0), InputHandler::GESTURE,
- SCROLL_BLOCKS_ON_NONE));
+ EXPECT_EQ(InputHandler::SCROLL_ON_MAIN_THREAD,
+ scrollbar_layer_impl->TryScroll(
+ gfx::PointF(), InputHandler::GESTURE, SCROLL_BLOCKS_ON_NONE));
// Create and attach an overlay scrollbar.
scrollbar.reset(new FakeScrollbar(false, false, true));
@@ -204,10 +203,9 @@ TEST_F(ScrollbarLayerTest, ShouldScrollNonOverlayOnMainThread) {
// The user shouldn't be able to drag an overlay scrollbar and the scroll
// may be handled in the compositor.
- EXPECT_EQ(
- InputHandler::SCROLL_IGNORED,
- scrollbar_layer_impl->TryScroll(gfx::Point(0, 0), InputHandler::GESTURE,
- SCROLL_BLOCKS_ON_NONE));
+ EXPECT_EQ(InputHandler::SCROLL_IGNORED,
+ scrollbar_layer_impl->TryScroll(
+ gfx::PointF(), InputHandler::GESTURE, SCROLL_BLOCKS_ON_NONE));
}
TEST_F(ScrollbarLayerTest, ScrollOffsetSynchronization) {
@@ -766,7 +764,7 @@ TEST_F(ScrollbarLayerTestResourceCreationAndRelease, TestResourceUpdate) {
scrollbar_layer->SetIsDrawable(true);
scrollbar_layer->SetBounds(gfx::Size(100, 15));
- scrollbar_layer->SetPosition(scrollbar_location);
+ scrollbar_layer->SetPosition(gfx::PointF(scrollbar_location));
layer_tree_root->SetBounds(gfx::Size(100, 200));
content_layer->SetBounds(gfx::Size(100, 200));
scrollbar_layer->set_visible_layer_rect(gfx::Rect(0, 0, 100, 200));
@@ -894,7 +892,7 @@ class ScaledScrollbarLayerTestResourceCreation : public ScrollbarLayerTest {
scrollbar_layer->SetIsDrawable(true);
scrollbar_layer->SetBounds(gfx::Size(100, 15));
- scrollbar_layer->SetPosition(scrollbar_location);
+ scrollbar_layer->SetPosition(gfx::PointF(scrollbar_location));
layer_tree_root->SetBounds(gfx::Size(100, 200));
content_layer->SetBounds(gfx::Size(100, 200));
scrollbar_layer->set_visible_layer_rect(
@@ -952,7 +950,7 @@ class ScaledScrollbarLayerTestScaledRasterization : public ScrollbarLayerTest {
layer_tree_host_->SetRootLayer(layer_tree_root);
scrollbar_layer->SetBounds(scrollbar_rect.size());
- scrollbar_layer->SetPosition(scrollbar_rect.origin());
+ scrollbar_layer->SetPosition(gfx::PointF(scrollbar_rect.origin()));
scrollbar_layer->fake_scrollbar()->set_location(scrollbar_rect.origin());
scrollbar_layer->fake_scrollbar()->set_track_rect(scrollbar_rect);
scrollbar_layer->set_visible_layer_rect(scrollbar_rect);

Powered by Google App Engine
This is Rietveld 408576698