| 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 EXPECT_EQ(zero_time + 200, timeline->ZeroTime()); | 268 EXPECT_EQ(zero_time + 200, timeline->ZeroTime()); |
| 269 | 269 |
| 270 timeline->SetCurrentTimeInternal(100); | 270 timeline->SetCurrentTimeInternal(100); |
| 271 EXPECT_EQ(100, timeline->CurrentTimeInternal()); | 271 EXPECT_EQ(100, timeline->CurrentTimeInternal()); |
| 272 EXPECT_EQ(zero_time + 100, timeline->ZeroTime()); | 272 EXPECT_EQ(zero_time + 100, timeline->ZeroTime()); |
| 273 | 273 |
| 274 timeline->SetCurrentTimeInternal(200); | 274 timeline->SetCurrentTimeInternal(200); |
| 275 EXPECT_EQ(200, timeline->CurrentTimeInternal()); | 275 EXPECT_EQ(200, timeline->CurrentTimeInternal()); |
| 276 EXPECT_EQ(zero_time, timeline->ZeroTime()); | 276 EXPECT_EQ(zero_time, timeline->ZeroTime()); |
| 277 | 277 |
| 278 timeline->setCurrentTime(0); | 278 timeline->setCurrentTime(0, false); |
| 279 EXPECT_EQ(0, timeline->currentTime()); | 279 EXPECT_EQ(0, timeline->currentTime()); |
| 280 EXPECT_EQ(zero_time + 200, timeline->ZeroTime()); | 280 EXPECT_EQ(zero_time + 200, timeline->ZeroTime()); |
| 281 | 281 |
| 282 timeline->setCurrentTime(1000); | 282 timeline->setCurrentTime(1000, false); |
| 283 EXPECT_EQ(1000, timeline->currentTime()); | 283 EXPECT_EQ(1000, timeline->currentTime()); |
| 284 EXPECT_EQ(zero_time + 199, timeline->ZeroTime()); | 284 EXPECT_EQ(zero_time + 199, timeline->ZeroTime()); |
| 285 | 285 |
| 286 timeline->setCurrentTime(2000); | 286 timeline->setCurrentTime(2000, false); |
| 287 EXPECT_EQ(2000, timeline->currentTime()); | 287 EXPECT_EQ(2000, timeline->currentTime()); |
| 288 EXPECT_EQ(zero_time + 198, timeline->ZeroTime()); | 288 EXPECT_EQ(zero_time + 198, timeline->ZeroTime()); |
| 289 } | 289 } |
| 290 | 290 |
| 291 TEST_F(AnimationAnimationTimelineTest, PauseForTesting) { | 291 TEST_F(AnimationAnimationTimelineTest, PauseForTesting) { |
| 292 float seek_time = 1; | 292 float seek_time = 1; |
| 293 timing.fill_mode = Timing::FillMode::FORWARDS; | 293 timing.fill_mode = Timing::FillMode::FORWARDS; |
| 294 KeyframeEffect* anim1 = | 294 KeyframeEffect* anim1 = |
| 295 KeyframeEffect::Create(element.Get(), | 295 KeyframeEffect::Create(element.Get(), |
| 296 AnimatableValueKeyframeEffectModel::Create( | 296 AnimatableValueKeyframeEffectModel::Create( |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 Wake(); | 331 Wake(); |
| 332 | 332 |
| 333 EXPECT_CALL(*platform_timing, ServiceOnNextFrame()); | 333 EXPECT_CALL(*platform_timing, ServiceOnNextFrame()); |
| 334 UpdateClockAndService(4.98); | 334 UpdateClockAndService(4.98); |
| 335 } | 335 } |
| 336 | 336 |
| 337 TEST_F(AnimationAnimationTimelineTest, UseAnimationAfterTimelineDeref) { | 337 TEST_F(AnimationAnimationTimelineTest, UseAnimationAfterTimelineDeref) { |
| 338 Animation* animation = timeline->Play(0); | 338 Animation* animation = timeline->Play(0); |
| 339 timeline.Clear(); | 339 timeline.Clear(); |
| 340 // Test passes if this does not crash. | 340 // Test passes if this does not crash. |
| 341 animation->setStartTime(0); | 341 animation->setStartTime(0, false); |
| 342 } | 342 } |
| 343 | 343 |
| 344 } // namespace blink | 344 } // namespace blink |
| OLD | NEW |