| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // Make sure the CompositableTiming is really compositable, otherwise | 102 // Make sure the CompositableTiming is really compositable, otherwise |
| 103 // most other tests will fail. | 103 // most other tests will fail. |
| 104 ASSERT(convertTimingForCompositor(m_timing, m_compositorTiming)); | 104 ASSERT(convertTimingForCompositor(m_timing, m_compositorTiming)); |
| 105 | 105 |
| 106 m_keyframeVector2 = createCompositableFloatKeyframeVector(2); | 106 m_keyframeVector2 = createCompositableFloatKeyframeVector(2); |
| 107 m_keyframeAnimationEffect2 = AnimatableValueKeyframeEffectModel::create(
*m_keyframeVector2); | 107 m_keyframeAnimationEffect2 = AnimatableValueKeyframeEffectModel::create(
*m_keyframeVector2); |
| 108 | 108 |
| 109 m_keyframeVector5 = createCompositableFloatKeyframeVector(5); | 109 m_keyframeVector5 = createCompositableFloatKeyframeVector(5); |
| 110 m_keyframeAnimationEffect5 = AnimatableValueKeyframeEffectModel::create(
*m_keyframeVector5); | 110 m_keyframeAnimationEffect5 = AnimatableValueKeyframeEffectModel::create(
*m_keyframeVector5); |
| 111 | 111 |
| 112 if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled()) { | 112 EXPECT_CALL(*m_mockCompositorFactory, createAnimationTimeline()) |
| 113 EXPECT_CALL(*m_mockCompositorFactory, createAnimationTimeline()) | 113 .WillOnce(Return(new WebCompositorAnimationTimelineMock())); |
| 114 .WillOnce(Return(new WebCompositorAnimationTimelineMock())); | 114 |
| 115 } | |
| 116 m_pageHolder = DummyPageHolder::create(); | 115 m_pageHolder = DummyPageHolder::create(); |
| 117 m_document = &m_pageHolder->document(); | 116 m_document = &m_pageHolder->document(); |
| 118 m_document->animationClock().resetTimeForTesting(); | 117 m_document->animationClock().resetTimeForTesting(); |
| 119 | 118 |
| 120 if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled()) { | 119 EXPECT_CALL(*m_mockCompositorFactory, createAnimationTimeline()) |
| 121 EXPECT_CALL(*m_mockCompositorFactory, createAnimationTimeline()) | 120 .WillOnce(Return(new WebCompositorAnimationTimelineMock())); |
| 122 .WillOnce(Return(new WebCompositorAnimationTimelineMock())); | 121 |
| 123 } | |
| 124 m_timeline = AnimationTimeline::create(m_document.get()); | 122 m_timeline = AnimationTimeline::create(m_document.get()); |
| 125 m_timeline->resetForTesting(); | 123 m_timeline->resetForTesting(); |
| 126 m_element = m_document->createElement("test", ASSERT_NO_EXCEPTION); | 124 m_element = m_document->createElement("test", ASSERT_NO_EXCEPTION); |
| 127 } | 125 } |
| 128 | 126 |
| 129 void TearDown() override | 127 void TearDown() override |
| 130 { | 128 { |
| 131 m_mockCompositorFactory = nullptr; | 129 m_mockCompositorFactory = nullptr; |
| 132 CompositorFactory::shutdown(); | 130 CompositorFactory::shutdown(); |
| 133 } | 131 } |
| (...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1226 simulateFrame(1.); | 1224 simulateFrame(1.); |
| 1227 | 1225 |
| 1228 element->setLayoutObject(nullptr); | 1226 element->setLayoutObject(nullptr); |
| 1229 LayoutObjectProxy::dispose(layoutObject); | 1227 LayoutObjectProxy::dispose(layoutObject); |
| 1230 | 1228 |
| 1231 Heap::collectAllGarbage(); | 1229 Heap::collectAllGarbage(); |
| 1232 EXPECT_TRUE(element->elementAnimations()->animations().isEmpty()); | 1230 EXPECT_TRUE(element->elementAnimations()->animations().isEmpty()); |
| 1233 } | 1231 } |
| 1234 | 1232 |
| 1235 } // namespace blink | 1233 } // namespace blink |
| OLD | NEW |