| 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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 EXPECT_TRUE(convertTimingForCompositor(m_timing, m_compositorTiming)); | 372 EXPECT_TRUE(convertTimingForCompositor(m_timing, m_compositorTiming)); |
| 373 EXPECT_DOUBLE_EQ(-6.0, m_compositorTiming.scaledTimeOffset); | 373 EXPECT_DOUBLE_EQ(-6.0, m_compositorTiming.scaledTimeOffset); |
| 374 EXPECT_DOUBLE_EQ(4.0, m_compositorTiming.adjustedIterationCount); | 374 EXPECT_DOUBLE_EQ(4.0, m_compositorTiming.adjustedIterationCount); |
| 375 | 375 |
| 376 m_timing.startDelay = -6.0; | 376 m_timing.startDelay = -6.0; |
| 377 EXPECT_TRUE(convertTimingForCompositor(m_timing, m_compositorTiming)); | 377 EXPECT_TRUE(convertTimingForCompositor(m_timing, m_compositorTiming)); |
| 378 EXPECT_DOUBLE_EQ(6.0, m_compositorTiming.scaledTimeOffset); | 378 EXPECT_DOUBLE_EQ(6.0, m_compositorTiming.scaledTimeOffset); |
| 379 EXPECT_DOUBLE_EQ(4.0, m_compositorTiming.adjustedIterationCount); | 379 EXPECT_DOUBLE_EQ(4.0, m_compositorTiming.adjustedIterationCount); |
| 380 | 380 |
| 381 m_timing.startDelay = 21.0; | 381 m_timing.startDelay = 21.0; |
| 382 EXPECT_FALSE(convertTimingForCompositor(m_timing, m_compositorTiming)); | 382 EXPECT_TRUE(convertTimingForCompositor(m_timing, m_compositorTiming)); |
| 383 } | 383 } |
| 384 | 384 |
| 385 TEST_F(AnimationCompositorAnimationsTest, ConvertTimingForCompositorPlaybackRate
) | 385 TEST_F(AnimationCompositorAnimationsTest, ConvertTimingForCompositorPlaybackRate
) |
| 386 { | 386 { |
| 387 m_timing.playbackRate = 1.0; | 387 m_timing.playbackRate = 1.0; |
| 388 EXPECT_TRUE(convertTimingForCompositor(m_timing, m_compositorTiming)); | 388 EXPECT_TRUE(convertTimingForCompositor(m_timing, m_compositorTiming)); |
| 389 EXPECT_DOUBLE_EQ(1.0, m_compositorTiming.playbackRate); | 389 EXPECT_DOUBLE_EQ(1.0, m_compositorTiming.playbackRate); |
| 390 | 390 |
| 391 m_timing.playbackRate = -2.3; | 391 m_timing.playbackRate = -2.3; |
| 392 EXPECT_TRUE(convertTimingForCompositor(m_timing, m_compositorTiming)); | 392 EXPECT_TRUE(convertTimingForCompositor(m_timing, m_compositorTiming)); |
| (...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1099 | 1099 |
| 1100 // Go! | 1100 // Go! |
| 1101 setCompositorForTesting(mockCompositor); | 1101 setCompositorForTesting(mockCompositor); |
| 1102 Vector<OwnPtr<WebCompositorAnimation> > result; | 1102 Vector<OwnPtr<WebCompositorAnimation> > result; |
| 1103 getAnimationOnCompositor(m_timing, *effect.get(), result); | 1103 getAnimationOnCompositor(m_timing, *effect.get(), result); |
| 1104 EXPECT_EQ(1U, result.size()); | 1104 EXPECT_EQ(1U, result.size()); |
| 1105 result[0].clear(); | 1105 result[0].clear(); |
| 1106 } | 1106 } |
| 1107 | 1107 |
| 1108 } // namespace blink | 1108 } // namespace blink |
| OLD | NEW |