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

Unified Diff: cc/trees/layer_tree_host_unittest_scroll.cc

Issue 870363005: Remove scroll_delta flooring hack (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
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..7f94244e57e4a408a54526ab59f2d5a6bb0f4fd8 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;
}
« no previous file with comments | « cc/trees/layer_tree_host_unittest_no_message_loop.cc ('k') | content/browser/renderer_host/compositor_impl_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698