| 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 7a9b63f5881962d3d3737dcccbda7c7c45dba115..aeeb4f5a54b5efc975e0d43f6d61f783f66660e0 100644 | 
| --- a/cc/trees/layer_tree_host_unittest_animation.cc | 
| +++ b/cc/trees/layer_tree_host_unittest_animation.cc | 
| @@ -829,33 +829,43 @@ MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestContinuousAnimate); | 
| class LayerTreeHostAnimationTestCancelAnimateCommit | 
| : public LayerTreeHostAnimationTest { | 
| public: | 
| -  LayerTreeHostAnimationTestCancelAnimateCommit() : num_animate_calls_(0) {} | 
| +  LayerTreeHostAnimationTestCancelAnimateCommit() | 
| +      : num_animate_calls_(0), num_commit_calls_(0), num_draw_calls_(0) {} | 
|  | 
| virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } | 
|  | 
| virtual void Animate(base::TimeTicks) OVERRIDE { | 
| +    num_animate_calls_++; | 
| // No-op animate will cancel the commit. | 
| -    if (++num_animate_calls_ == 2) { | 
| +    if (layer_tree_host()->source_frame_number() == 1) { | 
| EndTest(); | 
| return; | 
| } | 
| layer_tree_host()->SetNeedsAnimate(); | 
| } | 
|  | 
| -  virtual void CommitCompleteOnThread(LayerTreeHostImpl* tree_impl) OVERRIDE { | 
| -    if (num_animate_calls_ > 1) | 
| +  virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE { | 
| +    num_commit_calls_++; | 
| +    if (impl->active_tree()->source_frame_number() > 1) | 
| FAIL() << "Commit should have been canceled."; | 
| } | 
|  | 
| virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { | 
| -    if (num_animate_calls_ > 1) | 
| +    num_draw_calls_++; | 
| +    if (impl->active_tree()->source_frame_number() > 1) | 
| FAIL() << "Draw should have been canceled."; | 
| } | 
|  | 
| -  virtual void AfterTest() OVERRIDE { EXPECT_EQ(2, num_animate_calls_); } | 
| +  virtual void AfterTest() OVERRIDE { | 
| +    EXPECT_EQ(2, num_animate_calls_); | 
| +    EXPECT_EQ(1, num_commit_calls_); | 
| +    EXPECT_EQ(1, num_draw_calls_); | 
| +  } | 
|  | 
| private: | 
| int num_animate_calls_; | 
| +  int num_commit_calls_; | 
| +  int num_draw_calls_; | 
| FakeContentLayerClient client_; | 
| scoped_refptr<FakeContentLayer> content_; | 
| }; | 
|  |