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 248877ffe82b09e665b3cfc401af02a44ce93695..a34b38d6ea6d214b68eeeb247066b79311e73e7e 100644 |
--- a/cc/trees/layer_tree_host_unittest_scroll.cc |
+++ b/cc/trees/layer_tree_host_unittest_scroll.cc |
@@ -462,20 +462,22 @@ class LayerTreeHostScrollTestFractionalScroll : public LayerTreeHostScrollTest { |
break; |
case 1: |
EXPECT_VECTOR_EQ( |
- gfx::ToFlooredVector2d(scroll_amount_), |
+ gfx::ToRoundedVector2d(scroll_amount_), |
ScrollTreeForLayer(scroll_layer) |
->GetScrollOffsetBaseForTesting(scroll_layer->id())); |
- EXPECT_VECTOR_EQ(gfx::Vector2dF(fmod(scroll_amount_.x(), 1.0f), 0.0f), |
- ScrollDelta(scroll_layer)); |
+ EXPECT_VECTOR_EQ( |
+ scroll_amount_ - gfx::ToRoundedVector2d(scroll_amount_), |
+ ScrollDelta(scroll_layer)); |
PostSetNeedsCommitToMainThread(); |
break; |
case 2: |
EXPECT_VECTOR_EQ( |
- gfx::ToFlooredVector2d(scroll_amount_ + scroll_amount_), |
+ gfx::ToRoundedVector2d(scroll_amount_ + scroll_amount_), |
ScrollTreeForLayer(scroll_layer) |
->GetScrollOffsetBaseForTesting(scroll_layer->id())); |
EXPECT_VECTOR_EQ( |
- gfx::Vector2dF(fmod(2.0f * scroll_amount_.x(), 1.0f), 0.0f), |
+ scroll_amount_ + scroll_amount_ - |
+ gfx::ToRoundedVector2d(scroll_amount_ + scroll_amount_), |
ScrollDelta(scroll_layer)); |
EndTest(); |
break; |