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

Side by Side Diff: Source/core/animation/CompositorAnimationsTest.cpp

Issue 787353003: Animation: Allow cubic-bezier timing inputs outside the range [0, 1] in CC (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@0
Patch Set: Rebase Created 5 years, 11 months 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 unified diff | Download patch
« no previous file with comments | « Source/core/animation/CompositorAnimations.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013, Google Inc. All rights reserved. 2 * Copyright (c) 2013, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 m_keyframeAnimationEffect2 = AnimatableValueKeyframeEffectModel::create(*m_k eyframeVector2); 492 m_keyframeAnimationEffect2 = AnimatableValueKeyframeEffectModel::create(*m_k eyframeVector2);
493 493
494 (*m_keyframeVector5)[3]->setEasing(m_cubicEaseTimingFunction.get()); 494 (*m_keyframeVector5)[3]->setEasing(m_cubicEaseTimingFunction.get());
495 m_keyframeAnimationEffect5 = AnimatableValueKeyframeEffectModel::create(*m_k eyframeVector5); 495 m_keyframeAnimationEffect5 = AnimatableValueKeyframeEffectModel::create(*m_k eyframeVector5);
496 496
497 m_timing.timingFunction = m_cubicEaseTimingFunction; 497 m_timing.timingFunction = m_cubicEaseTimingFunction;
498 EXPECT_TRUE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimati onEffect2.get())); 498 EXPECT_TRUE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimati onEffect2.get()));
499 EXPECT_TRUE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimati onEffect5.get())); 499 EXPECT_TRUE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimati onEffect5.get()));
500 500
501 m_timing.timingFunction = m_cubicCustomTimingFunction; 501 m_timing.timingFunction = m_cubicCustomTimingFunction;
502 EXPECT_FALSE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimat ionEffect2.get())); 502 EXPECT_TRUE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimati onEffect2.get()));
503 EXPECT_FALSE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimat ionEffect5.get())); 503 EXPECT_TRUE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimati onEffect5.get()));
504 } 504 }
505 505
506 TEST_F(AnimationCompositorAnimationsTest, isCandidateForAnimationOnCompositorTim ingFunctionChainedCubicMatchingOffsets) 506 TEST_F(AnimationCompositorAnimationsTest, isCandidateForAnimationOnCompositorTim ingFunctionChainedCubicMatchingOffsets)
507 { 507 {
508 (*m_keyframeVector2)[0]->setEasing(m_cubicEaseTimingFunction.get()); 508 (*m_keyframeVector2)[0]->setEasing(m_cubicEaseTimingFunction.get());
509 m_keyframeAnimationEffect2 = AnimatableValueKeyframeEffectModel::create(*m_k eyframeVector2); 509 m_keyframeAnimationEffect2 = AnimatableValueKeyframeEffectModel::create(*m_k eyframeVector2);
510 EXPECT_TRUE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimati onEffect2.get())); 510 EXPECT_TRUE(isCandidateForAnimationOnCompositor(m_timing, *m_keyframeAnimati onEffect2.get()));
511 511
512 (*m_keyframeVector2)[0]->setEasing(m_cubicCustomTimingFunction.get()); 512 (*m_keyframeVector2)[0]->setEasing(m_cubicCustomTimingFunction.get());
513 m_keyframeAnimationEffect2 = AnimatableValueKeyframeEffectModel::create(*m_k eyframeVector2); 513 m_keyframeAnimationEffect2 = AnimatableValueKeyframeEffectModel::create(*m_k eyframeVector2);
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
1147 1147
1148 // Go! 1148 // Go!
1149 setCompositorForTesting(mockCompositor); 1149 setCompositorForTesting(mockCompositor);
1150 Vector<OwnPtr<WebCompositorAnimation> > result; 1150 Vector<OwnPtr<WebCompositorAnimation> > result;
1151 getAnimationOnCompositor(m_timing, *effect.get(), result); 1151 getAnimationOnCompositor(m_timing, *effect.get(), result);
1152 EXPECT_EQ(1U, result.size()); 1152 EXPECT_EQ(1U, result.size());
1153 result[0].clear(); 1153 result[0].clear();
1154 } 1154 }
1155 1155
1156 } // namespace blink 1156 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/animation/CompositorAnimations.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698