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

Side by Side Diff: Source/core/animation/DocumentTimelineTest.cpp

Issue 194673002: Web Animations: Refactor KeyframeEffectModel to work via an InterpolationEffect. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@interpolationWrap
Patch Set: Created 6 years, 9 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 RefPtrWillBeRawPtr<KeyframeEffectModel> effect = KeyframeEffectModel::create (KeyframeEffectModel::KeyframeVector()); 152 RefPtrWillBeRawPtr<KeyframeEffectModel> effect = KeyframeEffectModel::create (KeyframeEffectModel::KeyframeVector());
153 timing.fillMode = Timing::FillModeForwards; 153 timing.fillMode = Timing::FillModeForwards;
154 RefPtr<Animation> anim = Animation::create(element.get(), effect, timing); 154 RefPtr<Animation> anim = Animation::create(element.get(), effect, timing);
155 155
156 timeline->play(anim.get()); 156 timeline->play(anim.get());
157 157
158 platformTiming->expectNoMoreActions(); 158 platformTiming->expectNoMoreActions();
159 updateClockAndService(0); 159 updateClockAndService(0);
160 EXPECT_FLOAT_EQ(0, timeline->currentTime()); 160 EXPECT_FLOAT_EQ(0, timeline->currentTime());
161 EXPECT_TRUE(anim->isInEffect()); 161 EXPECT_TRUE(anim->isInEffect());
162 EXPECT_TRUE(anim->compositableValues()->isEmpty()); 162 EXPECT_TRUE(anim->activeInterpolations()->isEmpty());
163 163
164 platformTiming->expectNoMoreActions(); 164 platformTiming->expectNoMoreActions();
165 updateClockAndService(100); 165 updateClockAndService(100);
166 EXPECT_FLOAT_EQ(100, timeline->currentTime()); 166 EXPECT_FLOAT_EQ(100, timeline->currentTime());
167 } 167 }
168 168
169 TEST_F(AnimationDocumentTimelineTest, ZeroTime) 169 TEST_F(AnimationDocumentTimelineTest, ZeroTime)
170 { 170 {
171 timeline = DocumentTimeline::create(document.get()); 171 timeline = DocumentTimeline::create(document.get());
172 172
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 286
287 TEST_F(AnimationDocumentTimelineTest, UsePlayerAfterTimelineDeref) 287 TEST_F(AnimationDocumentTimelineTest, UsePlayerAfterTimelineDeref)
288 { 288 {
289 RefPtr<Player> player = timeline->createPlayer(0); 289 RefPtr<Player> player = timeline->createPlayer(0);
290 timeline.clear(); 290 timeline.clear();
291 // Test passes if this does not crash. 291 // Test passes if this does not crash.
292 player->setStartTime(0); 292 player->setStartTime(0);
293 } 293 }
294 294
295 } 295 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698