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

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

Issue 2321223003: Revert of Move collectGarbage* methods to ThreadState (Closed)
Patch Set: Created 4 years, 3 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 timeline = AnimationTimeline::create(document.get(), platformTiming); 70 timeline = AnimationTimeline::create(document.get(), platformTiming);
71 timeline->resetForTesting(); 71 timeline->resetForTesting();
72 ASSERT_EQ(0, timeline->currentTimeInternal()); 72 ASSERT_EQ(0, timeline->currentTimeInternal());
73 } 73 }
74 74
75 virtual void TearDown() 75 virtual void TearDown()
76 { 76 {
77 document.release(); 77 document.release();
78 element.release(); 78 element.release();
79 timeline.release(); 79 timeline.release();
80 ThreadState::current()-> collectAllGarbage(); 80 ThreadHeap::collectAllGarbage();
81 } 81 }
82 82
83 void updateClockAndService(double time) 83 void updateClockAndService(double time)
84 { 84 {
85 document->animationClock().updateTime(time); 85 document->animationClock().updateTime(time);
86 document->compositorPendingAnimations().update(false); 86 document->compositorPendingAnimations().update(false);
87 timeline->serviceAnimations(TimingUpdateForAnimationFrame); 87 timeline->serviceAnimations(TimingUpdateForAnimationFrame);
88 timeline->scheduleNextService(); 88 timeline->scheduleNextService();
89 } 89 }
90 90
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 341
342 TEST_F(AnimationAnimationTimelineTest, UseAnimationAfterTimelineDeref) 342 TEST_F(AnimationAnimationTimelineTest, UseAnimationAfterTimelineDeref)
343 { 343 {
344 Animation* animation = timeline->play(0); 344 Animation* animation = timeline->play(0);
345 timeline.clear(); 345 timeline.clear();
346 // Test passes if this does not crash. 346 // Test passes if this does not crash.
347 animation->setStartTime(0); 347 animation->setStartTime(0);
348 } 348 }
349 349
350 } // namespace blink 350 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698