| Index: cc/trees/layer_tree_host_impl_unittest.cc
|
| diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
|
| index 42c83bfdd267f8cdc77f8da36734c6a91c1b7be3..107a6405055f6ea5eb90e7bc1551286eb1117f6c 100644
|
| --- a/cc/trees/layer_tree_host_impl_unittest.cc
|
| +++ b/cc/trees/layer_tree_host_impl_unittest.cc
|
| @@ -5641,7 +5641,8 @@ TEST_F(LayerTreeHostImplTimelinesTest, ScrollAnimatedLatchToChild) {
|
| host_impl_->Animate();
|
| host_impl_->UpdateAnimationState(true);
|
|
|
| - EXPECT_EQ(gfx::ScrollOffset(0, 30), grand_child_layer->CurrentScrollOffset());
|
| + // Should have started scrolling.
|
| + EXPECT_NE(gfx::ScrollOffset(0, 30), grand_child_layer->CurrentScrollOffset());
|
| host_impl_->DidFinishImplFrame();
|
|
|
| begin_frame_args.frame_time =
|
| @@ -10759,7 +10760,7 @@ TEST_F(LayerTreeHostImplTest, ScrollAnimated) {
|
| host_impl_->Animate();
|
| host_impl_->UpdateAnimationState(true);
|
|
|
| - EXPECT_EQ(gfx::ScrollOffset(), scrolling_layer->CurrentScrollOffset());
|
| + EXPECT_NE(gfx::ScrollOffset(), scrolling_layer->CurrentScrollOffset());
|
| host_impl_->DidFinishImplFrame();
|
|
|
| begin_frame_args.frame_time =
|
| @@ -10900,13 +10901,15 @@ TEST_F(LayerTreeHostImplTest, ScrollAnimatedWithDelay) {
|
| begin_frame_args.sequence_number++;
|
| host_impl_->WillBeginImplFrame(begin_frame_args);
|
| host_impl_->UpdateAnimationState(true);
|
| - EXPECT_EQ(gfx::ScrollOffset(), scrolling_layer->CurrentScrollOffset());
|
| + EXPECT_NE(gfx::ScrollOffset(), scrolling_layer->CurrentScrollOffset());
|
| host_impl_->DidFinishImplFrame();
|
|
|
| - // Second tick after 50ms, animation should be half way done since
|
| - // the duration due to delay is 100ms.
|
| - begin_frame_args.frame_time =
|
| - start_time + base::TimeDelta::FromMilliseconds(50);
|
| + // Second tick after 50ms, animation should be half way done since the
|
| + // duration due to delay is 100ms. Subtract off the frame interval since we
|
| + // progress a full frame on the first tick.
|
| + base::TimeTicks half_way_time = start_time - begin_frame_args.interval +
|
| + base::TimeDelta::FromMilliseconds(50);
|
| + begin_frame_args.frame_time = half_way_time;
|
| begin_frame_args.sequence_number++;
|
| host_impl_->WillBeginImplFrame(begin_frame_args);
|
| host_impl_->UpdateAnimationState(true);
|
| @@ -10963,7 +10966,7 @@ TEST_F(LayerTreeHostImplTimelinesTest, ScrollAnimatedAborted) {
|
| EXPECT_TRUE(GetImplAnimationHost()->HasAnyAnimationTargetingProperty(
|
| scrolling_layer->element_id(), TargetProperty::SCROLL_OFFSET));
|
|
|
| - EXPECT_EQ(gfx::ScrollOffset(), scrolling_layer->CurrentScrollOffset());
|
| + EXPECT_NE(gfx::ScrollOffset(), scrolling_layer->CurrentScrollOffset());
|
| host_impl_->DidFinishImplFrame();
|
|
|
| begin_frame_args.frame_time =
|
| @@ -11032,7 +11035,7 @@ TEST_F(LayerTreeHostImplTimelinesTest, ScrollAnimated) {
|
| host_impl_->Animate();
|
| host_impl_->UpdateAnimationState(true);
|
|
|
| - EXPECT_EQ(gfx::ScrollOffset(), scrolling_layer->CurrentScrollOffset());
|
| + EXPECT_NE(gfx::ScrollOffset(), scrolling_layer->CurrentScrollOffset());
|
| host_impl_->DidFinishImplFrame();
|
|
|
| begin_frame_args.frame_time =
|
| @@ -11268,7 +11271,7 @@ TEST_F(LayerTreeHostImplTimelinesTest, ScrollAnimatedNotUserScrollable) {
|
| host_impl_->Animate();
|
| host_impl_->UpdateAnimationState(true);
|
|
|
| - EXPECT_EQ(gfx::ScrollOffset(), scrolling_layer->CurrentScrollOffset());
|
| + EXPECT_NE(gfx::ScrollOffset(), scrolling_layer->CurrentScrollOffset());
|
| host_impl_->DidFinishImplFrame();
|
|
|
| begin_frame_args.frame_time =
|
|
|