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 f717c2af9cf61ad23e0b38491a6b59b4a9993fe8..97108df6548a16f43788adb412b2fe60a2659321 100644 |
--- a/cc/trees/layer_tree_host_unittest_animation.cc |
+++ b/cc/trees/layer_tree_host_unittest_animation.cc |
@@ -1286,7 +1286,7 @@ class LayerTreeHostAnimationTestAddAnimationAfterAnimating |
: public LayerTreeHostAnimationTest { |
public: |
LayerTreeHostAnimationTestAddAnimationAfterAnimating() |
- : num_swap_buffers_(0) {} |
+ : num_swap_buffers_(0), num_animate_calls_(0) {} |
virtual void SetupTree() OVERRIDE { |
LayerTreeHostAnimationTest::SetupTree(); |
@@ -1311,6 +1311,12 @@ class LayerTreeHostAnimationTestAddAnimationAfterAnimating |
} |
} |
+ virtual void Animate(base::TimeTicks monotonic_time) OVERRIDE { |
+ EXPECT_LT(num_animate_calls_, num_swap_buffers_); |
+ num_animate_calls_++; |
+ LayerTreeHostAnimationTest::Animate(monotonic_time); |
+ } |
+ |
virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, |
bool result) OVERRIDE { |
// After both animations have started, verify that they have valid |
@@ -1342,6 +1348,7 @@ class LayerTreeHostAnimationTestAddAnimationAfterAnimating |
private: |
scoped_refptr<Layer> content_; |
int num_swap_buffers_; |
+ int num_animate_calls_; |
}; |
SINGLE_AND_MULTI_THREAD_TEST_F( |