summaryrefslogtreecommitdiffstats
path: root/cc/test
diff options
context:
space:
mode:
authorloyso <loyso@chromium.org>2016-01-05 17:36:07 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-06 01:36:53 +0000
commite3cfd6a1ba9d1e79e128987cd154630e4f38d444 (patch)
tree3b98ead5240997482d05c81bf1cb9775d870205f /cc/test
parent81f80a56ca04de0af4069f68f5e88cd87ab77fc9 (diff)
downloadchromium_src-e3cfd6a1ba9d1e79e128987cd154630e4f38d444.zip
chromium_src-e3cfd6a1ba9d1e79e128987cd154630e4f38d444.tar.gz
chromium_src-e3cfd6a1ba9d1e79e128987cd154630e4f38d444.tar.bz2
CC Animation: Port LayerTests to use animation timelines.
We preserve the old version of tests so we can fall back at any time. BUG=394777 R=ajuma@chromium.org R=vollick@chromium.org CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1559183002 Cr-Commit-Position: refs/heads/master@{#367743}
Diffstat (limited to 'cc/test')
-rw-r--r--cc/test/animation_test_common.cc10
-rw-r--r--cc/test/animation_test_common.h6
2 files changed, 16 insertions, 0 deletions
diff --git a/cc/test/animation_test_common.cc b/cc/test/animation_test_common.cc
index 721f6c2..f61e9bb 100644
--- a/cc/test/animation_test_common.cc
+++ b/cc/test/animation_test_common.cc
@@ -455,6 +455,16 @@ void RemoveAnimationFromLayerWithExistingPlayer(
controller->RemoveAnimation(animation_id);
}
+Animation* GetAnimationFromLayerWithExistingPlayer(
+ int layer_id,
+ scoped_refptr<AnimationTimeline> timeline,
+ int animation_id) {
+ LayerAnimationController* controller =
+ timeline->animation_host()->GetControllerForLayerId(layer_id);
+ DCHECK(controller);
+ return controller->GetAnimationById(animation_id);
+}
+
int AddAnimatedFilterToLayerWithPlayer(
int layer_id,
scoped_refptr<AnimationTimeline> timeline,
diff --git a/cc/test/animation_test_common.h b/cc/test/animation_test_common.h
index c62c185..19e7a7c 100644
--- a/cc/test/animation_test_common.h
+++ b/cc/test/animation_test_common.h
@@ -220,11 +220,17 @@ void AddAnimationToLayerWithExistingPlayer(
int layer_id,
scoped_refptr<AnimationTimeline> timeline,
scoped_ptr<Animation> animation);
+
void RemoveAnimationFromLayerWithExistingPlayer(
int layer_id,
scoped_refptr<AnimationTimeline> timeline,
int animation_id);
+Animation* GetAnimationFromLayerWithExistingPlayer(
+ int layer_id,
+ scoped_refptr<AnimationTimeline> timeline,
+ int animation_id);
+
int AddAnimatedFilterToLayerWithPlayer(
int layer_id,
scoped_refptr<AnimationTimeline> timeline,