| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 timeline = AnimationTimeline::create(document.get(), platformTiming); | 69 timeline = AnimationTimeline::create(document.get(), platformTiming); |
| 70 timeline->resetForTesting(); | 70 timeline->resetForTesting(); |
| 71 ASSERT_EQ(0, timeline->currentTimeInternal()); | 71 ASSERT_EQ(0, timeline->currentTimeInternal()); |
| 72 } | 72 } |
| 73 | 73 |
| 74 virtual void TearDown() | 74 virtual void TearDown() |
| 75 { | 75 { |
| 76 document.release(); | 76 document.release(); |
| 77 element.release(); | 77 element.release(); |
| 78 timeline.release(); | 78 timeline.release(); |
| 79 ThreadHeap::collectAllGarbage(); | 79 Heap::collectAllGarbage(); |
| 80 } | 80 } |
| 81 | 81 |
| 82 void updateClockAndService(double time) | 82 void updateClockAndService(double time) |
| 83 { | 83 { |
| 84 document->animationClock().updateTime(time); | 84 document->animationClock().updateTime(time); |
| 85 document->compositorPendingAnimations().update(false); | 85 document->compositorPendingAnimations().update(false); |
| 86 timeline->serviceAnimations(TimingUpdateForAnimationFrame); | 86 timeline->serviceAnimations(TimingUpdateForAnimationFrame); |
| 87 timeline->scheduleNextService(); | 87 timeline->scheduleNextService(); |
| 88 } | 88 } |
| 89 | 89 |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 | 354 |
| 355 TEST_F(AnimationAnimationTimelineTest, UseAnimationAfterTimelineDeref) | 355 TEST_F(AnimationAnimationTimelineTest, UseAnimationAfterTimelineDeref) |
| 356 { | 356 { |
| 357 Animation* animation = timeline->play(0); | 357 Animation* animation = timeline->play(0); |
| 358 timeline.clear(); | 358 timeline.clear(); |
| 359 // Test passes if this does not crash. | 359 // Test passes if this does not crash. |
| 360 animation->setStartTime(0); | 360 animation->setStartTime(0); |
| 361 } | 361 } |
| 362 | 362 |
| 363 } // namespace blink | 363 } // namespace blink |
| OLD | NEW |