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

Unified Diff: cc/trees/layer_tree_host_unittest_animation.cc

Issue 863253002: Update from https://crrev.com/312600 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 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_animation.cc
diff --git a/cc/trees/layer_tree_host_unittest_animation.cc b/cc/trees/layer_tree_host_unittest_animation.cc
index 75d8ab0e53ceda4f9eece4225ac44287645b1974..3868c879b16876c8e401cc6418b2715ceea24caa 100644
--- a/cc/trees/layer_tree_host_unittest_animation.cc
+++ b/cc/trees/layer_tree_host_unittest_animation.cc
@@ -1043,16 +1043,21 @@ class LayerTreeHostAnimationTestScrollOffsetAnimationRemoval
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- void DidCommit() override {
- Animation* animation =
- scroll_layer_->layer_animation_controller()->GetAnimation(
- Animation::ScrollOffset);
- if (animation) {
- scroll_layer_->layer_animation_controller()->RemoveAnimation(
- animation->id());
- scroll_layer_->SetScrollOffset(final_postion_);
- } else {
- EXPECT_EQ(final_postion_, scroll_layer_->scroll_offset());
+ void BeginMainFrame(const BeginFrameArgs& args) override {
+ switch (layer_tree_host()->source_frame_number()) {
+ case 0:
+ break;
+ case 1: {
+ Animation* animation =
+ scroll_layer_->layer_animation_controller()->GetAnimation(
+ Animation::ScrollOffset);
+ scroll_layer_->layer_animation_controller()->RemoveAnimation(
+ animation->id());
+ scroll_layer_->SetScrollOffset(final_postion_);
+ break;
+ }
+ default:
+ EXPECT_EQ(final_postion_, scroll_layer_->scroll_offset());
}
}

Powered by Google App Engine
This is Rietveld 408576698