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

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

Issue 1854543002: Oilpan: Remove WillBe types (part 7) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 RefPtr<TimingFunction> m_cubicCustomTimingFunction; 72 RefPtr<TimingFunction> m_cubicCustomTimingFunction;
73 RefPtr<TimingFunction> m_stepTimingFunction; 73 RefPtr<TimingFunction> m_stepTimingFunction;
74 74
75 Timing m_timing; 75 Timing m_timing;
76 CompositorAnimationsImpl::CompositorTiming m_compositorTiming; 76 CompositorAnimationsImpl::CompositorTiming m_compositorTiming;
77 OwnPtr<AnimatableValueKeyframeVector> m_keyframeVector2; 77 OwnPtr<AnimatableValueKeyframeVector> m_keyframeVector2;
78 Persistent<AnimatableValueKeyframeEffectModel> m_keyframeAnimationEffect2; 78 Persistent<AnimatableValueKeyframeEffectModel> m_keyframeAnimationEffect2;
79 OwnPtr<AnimatableValueKeyframeVector> m_keyframeVector5; 79 OwnPtr<AnimatableValueKeyframeVector> m_keyframeVector5;
80 Persistent<AnimatableValueKeyframeEffectModel> m_keyframeAnimationEffect5; 80 Persistent<AnimatableValueKeyframeEffectModel> m_keyframeAnimationEffect5;
81 81
82 RefPtrWillBePersistent<Document> m_document; 82 Persistent<Document> m_document;
83 RefPtrWillBePersistent<Element> m_element; 83 Persistent<Element> m_element;
84 Persistent<AnimationTimeline> m_timeline; 84 Persistent<AnimationTimeline> m_timeline;
85 OwnPtr<DummyPageHolder> m_pageHolder; 85 OwnPtr<DummyPageHolder> m_pageHolder;
86 CompositorFactoryMock* m_mockCompositorFactory; 86 CompositorFactoryMock* m_mockCompositorFactory;
87 87
88 void SetUp() override 88 void SetUp() override
89 { 89 {
90 AnimationCompositorAnimationsTestBase::SetUp(); 90 AnimationCompositorAnimationsTestBase::SetUp();
91 91
92 m_mockCompositorFactory = new CompositorFactoryMock(); 92 m_mockCompositorFactory = new CompositorFactoryMock();
93 CompositorFactory::initializeForTesting(adoptPtr(m_mockCompositorFactory )); 93 CompositorFactory::initializeForTesting(adoptPtr(m_mockCompositorFactory ));
(...skipping 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after
1175 1175
1176 // Go! 1176 // Go!
1177 Vector<OwnPtr<CompositorAnimation>> result; 1177 Vector<OwnPtr<CompositorAnimation>> result;
1178 getAnimationOnCompositor(m_timing, *effect, result); 1178 getAnimationOnCompositor(m_timing, *effect, result);
1179 EXPECT_EQ(1U, result.size()); 1179 EXPECT_EQ(1U, result.size());
1180 result[0].clear(); 1180 result[0].clear();
1181 } 1181 }
1182 1182
1183 TEST_F(AnimationCompositorAnimationsTest, CancelIncompatibleCompositorAnimations ) 1183 TEST_F(AnimationCompositorAnimationsTest, CancelIncompatibleCompositorAnimations )
1184 { 1184 {
1185 RefPtrWillBePersistent<Element> element = m_document->createElement("shared" , ASSERT_NO_EXCEPTION); 1185 Persistent<Element> element = m_document->createElement("shared", ASSERT_NO_ EXCEPTION);
1186 1186
1187 LayoutObjectProxy* layoutObject = LayoutObjectProxy::create(element.get()); 1187 LayoutObjectProxy* layoutObject = LayoutObjectProxy::create(element.get());
1188 element->setLayoutObject(layoutObject); 1188 element->setLayoutObject(layoutObject);
1189 1189
1190 AnimatableValueKeyframeVector keyFrames; 1190 AnimatableValueKeyframeVector keyFrames;
1191 keyFrames.append(createDefaultKeyframe(CSSPropertyOpacity, EffectModel::Comp ositeReplace, 0.0).get()); 1191 keyFrames.append(createDefaultKeyframe(CSSPropertyOpacity, EffectModel::Comp ositeReplace, 0.0).get());
1192 keyFrames.append(createDefaultKeyframe(CSSPropertyOpacity, EffectModel::Comp ositeReplace, 1.0).get()); 1192 keyFrames.append(createDefaultKeyframe(CSSPropertyOpacity, EffectModel::Comp ositeReplace, 1.0).get());
1193 EffectModel* animationEffect1 = AnimatableValueKeyframeEffectModel::create(k eyFrames); 1193 EffectModel* animationEffect1 = AnimatableValueKeyframeEffectModel::create(k eyFrames);
1194 EffectModel* animationEffect2 = AnimatableValueKeyframeEffectModel::create(k eyFrames); 1194 EffectModel* animationEffect2 = AnimatableValueKeyframeEffectModel::create(k eyFrames);
1195 1195
(...skipping 28 matching lines...) Expand all
1224 simulateFrame(1.); 1224 simulateFrame(1.);
1225 1225
1226 element->setLayoutObject(nullptr); 1226 element->setLayoutObject(nullptr);
1227 LayoutObjectProxy::dispose(layoutObject); 1227 LayoutObjectProxy::dispose(layoutObject);
1228 1228
1229 Heap::collectAllGarbage(); 1229 Heap::collectAllGarbage();
1230 EXPECT_TRUE(element->elementAnimations()->animations().isEmpty()); 1230 EXPECT_TRUE(element->elementAnimations()->animations().isEmpty());
1231 } 1231 }
1232 1232
1233 } // namespace blink 1233 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698