| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |