Index: trunk/src/cc/trees/layer_tree_host_unittest_animation.cc |
=================================================================== |
--- trunk/src/cc/trees/layer_tree_host_unittest_animation.cc (revision 245527) |
+++ trunk/src/cc/trees/layer_tree_host_unittest_animation.cc (working copy) |
@@ -27,12 +27,12 @@ |
} |
}; |
-// Makes sure that SetNeedsUpdateLayers does not cause the CommitRequested() |
-// state to be set. |
-class LayerTreeHostAnimationTestSetNeedsUpdateLayersShouldNotSetCommitRequested |
+// Makes sure that SetNeedsAnimate does not cause the CommitRequested() state to |
+// be set. |
+class LayerTreeHostAnimationTestSetNeedsAnimateShouldNotSetCommitRequested |
: public LayerTreeHostAnimationTest { |
public: |
- LayerTreeHostAnimationTestSetNeedsUpdateLayersShouldNotSetCommitRequested() |
+ LayerTreeHostAnimationTestSetNeedsAnimateShouldNotSetCommitRequested() |
: num_commits_(0) {} |
virtual void BeginTest() OVERRIDE { |
@@ -45,7 +45,7 @@ |
if (num_commits_ != 1) |
return; |
- layer_tree_host()->SetNeedsUpdateLayers(); |
+ layer_tree_host()->SetNeedsAnimate(); |
// Right now, CommitRequested is going to be true, because during |
// BeginFrame, we force CommitRequested to true to prevent requests from |
// hitting the impl thread. But, when the next DidCommit happens, we should |
@@ -55,11 +55,11 @@ |
virtual void DidCommit() OVERRIDE { |
if (!num_commits_) { |
EXPECT_FALSE(layer_tree_host()->CommitRequested()); |
- layer_tree_host()->SetNeedsUpdateLayers(); |
+ layer_tree_host()->SetNeedsAnimate(); |
EXPECT_FALSE(layer_tree_host()->CommitRequested()); |
} |
- // Verifies that the SetNeedsUpdateLayers we made in ::Animate did not |
+ // Verifies that the SetNeedsAnimate we made in ::Animate did not |
// trigger CommitRequested. |
EXPECT_FALSE(layer_tree_host()->CommitRequested()); |
EndTest(); |
@@ -73,17 +73,17 @@ |
}; |
MULTI_THREAD_TEST_F( |
- LayerTreeHostAnimationTestSetNeedsUpdateLayersShouldNotSetCommitRequested); |
+ LayerTreeHostAnimationTestSetNeedsAnimateShouldNotSetCommitRequested); |
// Trigger a frame with SetNeedsCommit. Then, inside the resulting animate |
-// callback, request another frame using SetNeedsUpdateLayers. End the test when |
+// callback, request another frame using SetNeedsAnimate. End the test when |
// animate gets called yet-again, indicating that the proxy is correctly |
-// handling the case where SetNeedsUpdateLayers() is called inside the |
-// BeginFrame flow. |
-class LayerTreeHostAnimationTestSetNeedsUpdateLayersInsideAnimationCallback |
+// handling the case where SetNeedsAnimate() is called inside the BeginFrame |
+// flow. |
+class LayerTreeHostAnimationTestSetNeedsAnimateInsideAnimationCallback |
: public LayerTreeHostAnimationTest { |
public: |
- LayerTreeHostAnimationTestSetNeedsUpdateLayersInsideAnimationCallback() |
+ LayerTreeHostAnimationTestSetNeedsAnimateInsideAnimationCallback() |
: num_animates_(0) {} |
virtual void BeginTest() OVERRIDE { |
@@ -92,7 +92,7 @@ |
virtual void Animate(base::TimeTicks) OVERRIDE { |
if (!num_animates_) { |
- layer_tree_host()->SetNeedsUpdateLayers(); |
+ layer_tree_host()->SetNeedsAnimate(); |
num_animates_++; |
return; |
} |
@@ -106,7 +106,7 @@ |
}; |
MULTI_THREAD_TEST_F( |
- LayerTreeHostAnimationTestSetNeedsUpdateLayersInsideAnimationCallback); |
+ LayerTreeHostAnimationTestSetNeedsAnimateInsideAnimationCallback); |
// Add a layer animation and confirm that |
// LayerTreeHostImpl::updateAnimationState does get called and continues to |
@@ -732,21 +732,14 @@ |
PostSetNeedsCommitToMainThread(); |
} |
- virtual void SetupTree() OVERRIDE { |
- LayerTreeHostAnimationTest::SetupTree(); |
- content_ = FakeContentLayer::Create(&client_); |
- content_->set_always_update_resources(true); |
- layer_tree_host()->root_layer()->AddChild(content_); |
- } |
- |
virtual void Animate(base::TimeTicks) OVERRIDE { |
if (num_draw_layers_ == 2) |
return; |
- layer_tree_host()->SetNeedsUpdateLayers(); |
+ layer_tree_host()->SetNeedsAnimate(); |
} |
virtual void Layout() OVERRIDE { |
- content_->SetNeedsDisplay(); |
+ layer_tree_host()->root_layer()->SetNeedsDisplay(); |
} |
virtual void CommitCompleteOnThread(LayerTreeHostImpl* tree_impl) OVERRIDE { |
@@ -768,8 +761,6 @@ |
private: |
int num_commit_complete_; |
int num_draw_layers_; |
- FakeContentLayerClient client_; |
- scoped_refptr<FakeContentLayer> content_; |
}; |
MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestContinuousAnimate); |