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

Unified Diff: cc/trees/layer_tree_host_unittest_scroll.cc

Issue 903273002: Update from https://crrev.com/315085 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « cc/trees/layer_tree_host_unittest_no_message_loop.cc ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest_scroll.cc
diff --git a/cc/trees/layer_tree_host_unittest_scroll.cc b/cc/trees/layer_tree_host_unittest_scroll.cc
index 1c20b4cff22708655ec66b5f9ad62b76bd42a9a4..03a086060ba9b076fee9aeeda2108b7ce566cae2 100644
--- a/cc/trees/layer_tree_host_unittest_scroll.cc
+++ b/cc/trees/layer_tree_host_unittest_scroll.cc
@@ -429,19 +429,14 @@ class LayerTreeHostScrollTestFractionalScroll : public LayerTreeHostScrollTest {
PostSetNeedsCommitToMainThread();
break;
case 1:
- EXPECT_VECTOR_EQ(scroll_layer->BaseScrollOffset(),
- gfx::ToFlooredVector2d(scroll_amount_));
- EXPECT_VECTOR_EQ(scroll_layer->ScrollDelta(),
- gfx::Vector2dF(fmod(scroll_amount_.x(), 1.0f), 0.0f));
+ EXPECT_VECTOR_EQ(scroll_layer->BaseScrollOffset(), scroll_amount_);
+ EXPECT_VECTOR_EQ(scroll_layer->ScrollDelta(), gfx::Vector2dF());
PostSetNeedsCommitToMainThread();
break;
case 2:
- EXPECT_VECTOR_EQ(
- scroll_layer->BaseScrollOffset(),
- gfx::ToFlooredVector2d(scroll_amount_ + scroll_amount_));
- EXPECT_VECTOR_EQ(
- scroll_layer->ScrollDelta(),
- gfx::Vector2dF(fmod(2.0f * scroll_amount_.x(), 1.0f), 0.0f));
+ EXPECT_VECTOR_EQ(scroll_layer->BaseScrollOffset(),
+ (scroll_amount_ + scroll_amount_));
+ EXPECT_VECTOR_EQ(scroll_layer->ScrollDelta(), gfx::Vector2dF());
EndTest();
break;
}
@@ -1044,21 +1039,24 @@ class LayerTreeHostScrollTestScrollZeroMaxScrollOffset
// Set max_scroll_offset = (100, 100).
scroll_layer->SetBounds(
gfx::Size(root->bounds().width() + 100, root->bounds().height() + 100));
- EXPECT_EQ(InputHandler::ScrollStarted,
- scroll_layer->TryScroll(gfx::PointF(0.0f, 1.0f),
- InputHandler::Gesture));
+ EXPECT_EQ(
+ InputHandler::ScrollStarted,
+ scroll_layer->TryScroll(gfx::PointF(0.0f, 1.0f), InputHandler::Gesture,
+ ScrollBlocksOnNone));
// Set max_scroll_offset = (0, 0).
scroll_layer->SetBounds(root->bounds());
- EXPECT_EQ(InputHandler::ScrollIgnored,
- scroll_layer->TryScroll(gfx::PointF(0.0f, 1.0f),
- InputHandler::Gesture));
+ EXPECT_EQ(
+ InputHandler::ScrollIgnored,
+ scroll_layer->TryScroll(gfx::PointF(0.0f, 1.0f), InputHandler::Gesture,
+ ScrollBlocksOnNone));
// Set max_scroll_offset = (-100, -100).
scroll_layer->SetBounds(gfx::Size());
- EXPECT_EQ(InputHandler::ScrollIgnored,
- scroll_layer->TryScroll(gfx::PointF(0.0f, 1.0f),
- InputHandler::Gesture));
+ EXPECT_EQ(
+ InputHandler::ScrollIgnored,
+ scroll_layer->TryScroll(gfx::PointF(0.0f, 1.0f), InputHandler::Gesture,
+ ScrollBlocksOnNone));
EndTest();
}
« no previous file with comments | « cc/trees/layer_tree_host_unittest_no_message_loop.cc ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698