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

Unified Diff: cc/trees/layer_tree_host_unittest_scroll.cc

Issue 1028333002: Chromium -> Mojo roll. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 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_picture.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 547ece77c2094128d56a6513eab8a54d588b0fe8..be972e9406e7de12ac7f7d9f453d3677e716f3fe 100644
--- a/cc/trees/layer_tree_host_unittest_scroll.cc
+++ b/cc/trees/layer_tree_host_unittest_scroll.cc
@@ -429,14 +429,19 @@ class LayerTreeHostScrollTestFractionalScroll : public LayerTreeHostScrollTest {
PostSetNeedsCommitToMainThread();
break;
case 1:
- EXPECT_VECTOR_EQ(scroll_layer->BaseScrollOffset(), scroll_amount_);
- EXPECT_VECTOR_EQ(scroll_layer->ScrollDelta(), gfx::Vector2dF());
+ 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));
PostSetNeedsCommitToMainThread();
break;
case 2:
- EXPECT_VECTOR_EQ(scroll_layer->BaseScrollOffset(),
- (scroll_amount_ + scroll_amount_));
- EXPECT_VECTOR_EQ(scroll_layer->ScrollDelta(), gfx::Vector2dF());
+ 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));
EndTest();
break;
}
@@ -1121,14 +1126,10 @@ TEST(LayerTreeHostFlingTest, DidStopFlingingThread) {
ASSERT_TRUE(impl_thread.message_loop_proxy().get());
scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
new TestSharedBitmapManager());
- scoped_ptr<LayerTreeHost> layer_tree_host =
- LayerTreeHost::CreateThreaded(&client,
- shared_bitmap_manager.get(),
- NULL,
- settings,
- base::MessageLoopProxy::current(),
- impl_thread.message_loop_proxy(),
- nullptr);
+ scoped_ptr<LayerTreeHost> layer_tree_host = LayerTreeHost::CreateThreaded(
+ &client, shared_bitmap_manager.get(), NULL, NULL, settings,
+ base::MessageLoopProxy::current(), impl_thread.message_loop_proxy(),
+ nullptr);
impl_thread.message_loop_proxy()
->PostTask(FROM_HERE,
« no previous file with comments | « cc/trees/layer_tree_host_unittest_picture.cc ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698