| 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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 | 333 |
| 334 TEST_F(AnimationCompositorAnimationsTest, ConvertTimingForCompositorIterationCou
nt) | 334 TEST_F(AnimationCompositorAnimationsTest, ConvertTimingForCompositorIterationCou
nt) |
| 335 { | 335 { |
| 336 m_timing.iterationCount = 5.0; | 336 m_timing.iterationCount = 5.0; |
| 337 EXPECT_TRUE(convertTimingForCompositor(m_timing, m_compositorTiming)); | 337 EXPECT_TRUE(convertTimingForCompositor(m_timing, m_compositorTiming)); |
| 338 EXPECT_EQ(5, m_compositorTiming.adjustedIterationCount); | 338 EXPECT_EQ(5, m_compositorTiming.adjustedIterationCount); |
| 339 | 339 |
| 340 m_timing.iterationCount = 5.5; | 340 m_timing.iterationCount = 5.5; |
| 341 EXPECT_FALSE(convertTimingForCompositor(m_timing, m_compositorTiming)); | 341 EXPECT_FALSE(convertTimingForCompositor(m_timing, m_compositorTiming)); |
| 342 | 342 |
| 343 // Asserts will only trigger on DEBUG build. | |
| 344 // EXPECT_DEATH tests are flaky on Android. | 343 // EXPECT_DEATH tests are flaky on Android. |
| 345 #if !defined(NDEBUG) && !OS(ANDROID) | 344 #if ENABLE(ASSERT) && !OS(ANDROID) |
| 346 m_timing.iterationCount = -1; | 345 m_timing.iterationCount = -1; |
| 347 EXPECT_DEATH(convertTimingForCompositor(m_timing, m_compositorTiming), ""); | 346 EXPECT_DEATH(convertTimingForCompositor(m_timing, m_compositorTiming), ""); |
| 348 #endif | 347 #endif |
| 349 | 348 |
| 350 m_timing.iterationCount = std::numeric_limits<double>::infinity(); | 349 m_timing.iterationCount = std::numeric_limits<double>::infinity(); |
| 351 EXPECT_TRUE(convertTimingForCompositor(m_timing, m_compositorTiming)); | 350 EXPECT_TRUE(convertTimingForCompositor(m_timing, m_compositorTiming)); |
| 352 EXPECT_EQ(-1, m_compositorTiming.adjustedIterationCount); | 351 EXPECT_EQ(-1, m_compositorTiming.adjustedIterationCount); |
| 353 | 352 |
| 354 m_timing.iterationCount = std::numeric_limits<double>::infinity(); | 353 m_timing.iterationCount = std::numeric_limits<double>::infinity(); |
| 355 m_timing.iterationDuration = 5.0; | 354 m_timing.iterationDuration = 5.0; |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 932 // Go! | 931 // Go! |
| 933 setCompositorForTesting(mockCompositor); | 932 setCompositorForTesting(mockCompositor); |
| 934 Vector<OwnPtr<blink::WebAnimation> > result; | 933 Vector<OwnPtr<blink::WebAnimation> > result; |
| 935 getAnimationOnCompositor(m_timing, *effect.get(), result); | 934 getAnimationOnCompositor(m_timing, *effect.get(), result); |
| 936 EXPECT_EQ(1U, result.size()); | 935 EXPECT_EQ(1U, result.size()); |
| 937 result[0].clear(); | 936 result[0].clear(); |
| 938 } | 937 } |
| 939 | 938 |
| 940 | 939 |
| 941 } // namespace WebCore | 940 } // namespace WebCore |
| OLD | NEW |