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

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

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 EXPECT_EQ(zeroTime + 199, timeline->zeroTime()); 283 EXPECT_EQ(zeroTime + 199, timeline->zeroTime());
284 284
285 timeline->setCurrentTime(2000); 285 timeline->setCurrentTime(2000);
286 EXPECT_EQ(2000, timeline->currentTime()); 286 EXPECT_EQ(2000, timeline->currentTime());
287 EXPECT_EQ(zeroTime + 198, timeline->zeroTime()); 287 EXPECT_EQ(zeroTime + 198, timeline->zeroTime());
288 } 288 }
289 289
290 TEST_F(AnimationAnimationTimelineTest, PauseForTesting) { 290 TEST_F(AnimationAnimationTimelineTest, PauseForTesting) {
291 float seekTime = 1; 291 float seekTime = 1;
292 timing.fillMode = Timing::FillMode::FORWARDS; 292 timing.fillMode = Timing::FillMode::FORWARDS;
293 KeyframeEffect* anim1 = KeyframeEffect::create( 293 KeyframeEffect* anim1 =
294 element.get(), AnimatableValueKeyframeEffectModel::create( 294 KeyframeEffect::create(element.get(),
295 AnimatableValueKeyframeVector()), 295 AnimatableValueKeyframeEffectModel::create(
296 timing); 296 AnimatableValueKeyframeVector()),
297 KeyframeEffect* anim2 = KeyframeEffect::create( 297 timing);
298 element.get(), AnimatableValueKeyframeEffectModel::create( 298 KeyframeEffect* anim2 =
299 AnimatableValueKeyframeVector()), 299 KeyframeEffect::create(element.get(),
300 timing); 300 AnimatableValueKeyframeEffectModel::create(
301 AnimatableValueKeyframeVector()),
302 timing);
301 Animation* animation1 = timeline->play(anim1); 303 Animation* animation1 = timeline->play(anim1);
302 Animation* animation2 = timeline->play(anim2); 304 Animation* animation2 = timeline->play(anim2);
303 timeline->pauseAnimationsForTesting(seekTime); 305 timeline->pauseAnimationsForTesting(seekTime);
304 306
305 EXPECT_FLOAT_EQ(seekTime, animation1->currentTimeInternal()); 307 EXPECT_FLOAT_EQ(seekTime, animation1->currentTimeInternal());
306 EXPECT_FLOAT_EQ(seekTime, animation2->currentTimeInternal()); 308 EXPECT_FLOAT_EQ(seekTime, animation2->currentTimeInternal());
307 } 309 }
308 310
309 TEST_F(AnimationAnimationTimelineTest, DelayBeforeAnimationStart) { 311 TEST_F(AnimationAnimationTimelineTest, DelayBeforeAnimationStart) {
310 timing.iterationDuration = 2; 312 timing.iterationDuration = 2;
(...skipping 21 matching lines...) Expand all
332 } 334 }
333 335
334 TEST_F(AnimationAnimationTimelineTest, UseAnimationAfterTimelineDeref) { 336 TEST_F(AnimationAnimationTimelineTest, UseAnimationAfterTimelineDeref) {
335 Animation* animation = timeline->play(0); 337 Animation* animation = timeline->play(0);
336 timeline.clear(); 338 timeline.clear();
337 // Test passes if this does not crash. 339 // Test passes if this does not crash.
338 animation->setStartTime(0); 340 animation->setStartTime(0);
339 } 341 }
340 342
341 } // namespace blink 343 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698