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 | 268 |
269 platformTiming->expectNextFrameAction(); | 269 platformTiming->expectNextFrameAction(); |
270 updateClockAndService(4.98); | 270 updateClockAndService(4.98); |
271 } | 271 } |
272 | 272 |
273 TEST_F(AnimationDocumentTimelineTest, PlayAfterDocumentDeref) | 273 TEST_F(AnimationDocumentTimelineTest, PlayAfterDocumentDeref) |
274 { | 274 { |
275 timing.iterationDuration = 2; | 275 timing.iterationDuration = 2; |
276 timing.startDelay = 5; | 276 timing.startDelay = 5; |
277 | 277 |
278 timeline = document->timeline(); | 278 timeline = &document->timeline(); |
279 element = nullptr; | 279 element = nullptr; |
280 document = nullptr; | 280 document = nullptr; |
281 | 281 |
282 RefPtr<Animation> anim = Animation::create(nullptr, nullptr, timing); | 282 RefPtr<Animation> anim = Animation::create(nullptr, nullptr, timing); |
283 // Test passes if this does not crash. | 283 // Test passes if this does not crash. |
284 timeline->play(anim.get()); | 284 timeline->play(anim.get()); |
285 } | 285 } |
286 | 286 |
287 TEST_F(AnimationDocumentTimelineTest, UsePlayerAfterTimelineDeref) | 287 TEST_F(AnimationDocumentTimelineTest, UsePlayerAfterTimelineDeref) |
288 { | 288 { |
289 RefPtr<Player> player = timeline->createPlayer(0); | 289 RefPtr<Player> player = timeline->createPlayer(0); |
290 timeline.clear(); | 290 timeline.clear(); |
291 // Test passes if this does not crash. | 291 // Test passes if this does not crash. |
292 player->setStartTime(0); | 292 player->setStartTime(0); |
293 } | 293 } |
294 | 294 |
295 } | 295 } |
OLD | NEW |