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

Unified Diff: cc/trees/layer_tree_host_unittest_animation.cc

Issue 2480203002: ui: Cleanup class/struct forward declarations (Closed)
Patch Set: Sync CL to position 430550 Created 4 years, 1 month 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_in_process.cc ('k') | cc/trees/layer_tree_host_unittest_record_gpu_histogram.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c2d83cd4c9738a262b9ff999d4f38774e9b9a02f..b6c4053e7b9b86057c6ac41cfa01d442dca3faee 100644
--- a/cc/trees/layer_tree_host_unittest_animation.cc
+++ b/cc/trees/layer_tree_host_unittest_animation.cc
@@ -44,7 +44,7 @@ class LayerTreeHostAnimationTest : public LayerTreeTest {
}
void AttachPlayersToTimeline() {
- layer_tree()->animation_host()->AddAnimationTimeline(timeline_.get());
+ animation_host()->AddAnimationTimeline(timeline_.get());
layer_tree()->SetElementIdsForTesting();
timeline_->AttachPlayer(player_.get());
timeline_->AttachPlayer(player_child_.get());
@@ -800,14 +800,10 @@ class LayerTreeHostAnimationTestScrollOffsetAnimationTakeover
if (layer_tree_host()->SourceFrameNumber() == 1) {
// Add an update after the first commit to trigger the animation takeover
// path.
- layer_tree()
- ->animation_host()
- ->scroll_offset_animations()
- .AddTakeoverUpdate(scroll_layer_->element_id());
- EXPECT_TRUE(layer_tree()
- ->animation_host()
- ->scroll_offset_animations()
- .HasUpdatesForTesting());
+ animation_host()->scroll_offset_animations().AddTakeoverUpdate(
+ scroll_layer_->element_id());
+ EXPECT_TRUE(
+ animation_host()->scroll_offset_animations().HasUpdatesForTesting());
}
}
@@ -874,21 +870,14 @@ class LayerTreeHostAnimationTestScrollOffsetAnimationAdjusted
if (layer_tree_host()->SourceFrameNumber() == 1) {
// Add an update after the first commit to trigger the animation update
// path.
- layer_tree()
- ->animation_host()
- ->scroll_offset_animations()
- .AddAdjustmentUpdate(scroll_layer_->element_id(),
- gfx::Vector2dF(100.f, 100.f));
- EXPECT_TRUE(layer_tree()
- ->animation_host()
- ->scroll_offset_animations()
- .HasUpdatesForTesting());
+ animation_host()->scroll_offset_animations().AddAdjustmentUpdate(
+ scroll_layer_->element_id(), gfx::Vector2dF(100.f, 100.f));
+ EXPECT_TRUE(
+ animation_host()->scroll_offset_animations().HasUpdatesForTesting());
} else if (layer_tree_host()->SourceFrameNumber() == 2) {
// Verify that the update queue is cleared after the update is applied.
- EXPECT_FALSE(layer_tree()
- ->animation_host()
- ->scroll_offset_animations()
- .HasUpdatesForTesting());
+ EXPECT_FALSE(
+ animation_host()->scroll_offset_animations().HasUpdatesForTesting());
}
}
@@ -1254,7 +1243,7 @@ class LayerTreeHostAnimationTestAnimatedLayerRemovedAndAdded
layer_tree()->SetElementIdsForTesting();
- layer_tree()->animation_host()->AddAnimationTimeline(timeline_.get());
+ animation_host()->AddAnimationTimeline(timeline_.get());
timeline_->AttachPlayer(player_.get());
player_->AttachElement(layer_->element_id());
DCHECK(player_->element_animations());
@@ -1271,7 +1260,7 @@ class LayerTreeHostAnimationTestAnimatedLayerRemovedAndAdded
player_->element_animations()->has_element_in_active_list());
EXPECT_FALSE(
player_->element_animations()->has_element_in_pending_list());
- EXPECT_TRUE(layer_tree()->animation_host()->NeedsAnimateLayers());
+ EXPECT_TRUE(animation_host()->NeedsAnimateLayers());
break;
case 1:
layer_->RemoveFromParent();
@@ -1279,7 +1268,7 @@ class LayerTreeHostAnimationTestAnimatedLayerRemovedAndAdded
player_->element_animations()->has_element_in_active_list());
EXPECT_FALSE(
player_->element_animations()->has_element_in_pending_list());
- EXPECT_FALSE(layer_tree()->animation_host()->NeedsAnimateLayers());
+ EXPECT_FALSE(animation_host()->NeedsAnimateLayers());
break;
case 2:
layer_tree()->root_layer()->AddChild(layer_);
@@ -1287,7 +1276,7 @@ class LayerTreeHostAnimationTestAnimatedLayerRemovedAndAdded
player_->element_animations()->has_element_in_active_list());
EXPECT_FALSE(
player_->element_animations()->has_element_in_pending_list());
- EXPECT_TRUE(layer_tree()->animation_host()->NeedsAnimateLayers());
+ EXPECT_TRUE(animation_host()->NeedsAnimateLayers());
break;
}
}
« no previous file with comments | « cc/trees/layer_tree_host_in_process.cc ('k') | cc/trees/layer_tree_host_unittest_record_gpu_histogram.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698