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

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

Issue 2384263003: Reflow comments in core/animation and subdirs (Closed)
Patch Set: Created 4 years, 2 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 308
309 TEST_F(AnimationAnimationTimelineTest, DelayBeforeAnimationStart) { 309 TEST_F(AnimationAnimationTimelineTest, DelayBeforeAnimationStart) {
310 timing.iterationDuration = 2; 310 timing.iterationDuration = 2;
311 timing.startDelay = 5; 311 timing.startDelay = 5;
312 312
313 KeyframeEffect* keyframeEffect = 313 KeyframeEffect* keyframeEffect =
314 KeyframeEffect::create(element.get(), nullptr, timing); 314 KeyframeEffect::create(element.get(), nullptr, timing);
315 315
316 timeline->play(keyframeEffect); 316 timeline->play(keyframeEffect);
317 317
318 // TODO: Put the animation startTime in the future when we add the capability to change animation startTime 318 // TODO: Put the animation startTime in the future when we add the capability
319 // to change animation startTime
319 EXPECT_CALL(*platformTiming, wakeAfter(timing.startDelay - minimumDelay())); 320 EXPECT_CALL(*platformTiming, wakeAfter(timing.startDelay - minimumDelay()));
320 updateClockAndService(0); 321 updateClockAndService(0);
321 322
322 EXPECT_CALL(*platformTiming, 323 EXPECT_CALL(*platformTiming,
323 wakeAfter(timing.startDelay - minimumDelay() - 1.5)); 324 wakeAfter(timing.startDelay - minimumDelay() - 1.5));
324 updateClockAndService(1.5); 325 updateClockAndService(1.5);
325 326
326 EXPECT_CALL(*platformTiming, serviceOnNextFrame()); 327 EXPECT_CALL(*platformTiming, serviceOnNextFrame());
327 wake(); 328 wake();
328 329
329 EXPECT_CALL(*platformTiming, serviceOnNextFrame()); 330 EXPECT_CALL(*platformTiming, serviceOnNextFrame());
330 updateClockAndService(4.98); 331 updateClockAndService(4.98);
331 } 332 }
332 333
333 TEST_F(AnimationAnimationTimelineTest, UseAnimationAfterTimelineDeref) { 334 TEST_F(AnimationAnimationTimelineTest, UseAnimationAfterTimelineDeref) {
334 Animation* animation = timeline->play(0); 335 Animation* animation = timeline->play(0);
335 timeline.clear(); 336 timeline.clear();
336 // Test passes if this does not crash. 337 // Test passes if this does not crash.
337 animation->setStartTime(0); 338 animation->setStartTime(0);
338 } 339 }
339 340
340 } // namespace blink 341 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698