| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 return Animation::create(0, nullptr, timing); | 75 return Animation::create(0, nullptr, timing); |
| 76 } | 76 } |
| 77 | 77 |
| 78 bool updateTimeline(double time) | 78 bool updateTimeline(double time) |
| 79 { | 79 { |
| 80 document->animationClock().updateTime(time); | 80 document->animationClock().updateTime(time); |
| 81 // The timeline does not know about our player, so we have to explicitly
call update(). | 81 // The timeline does not know about our player, so we have to explicitly
call update(). |
| 82 return player->update(TimingUpdateOnDemand); | 82 return player->update(TimingUpdateOnDemand); |
| 83 } | 83 } |
| 84 | 84 |
| 85 RefPtr<Document> document; | 85 RefPtrWillBePersistent<Document> document; |
| 86 RefPtrWillBePersistent<AnimationTimeline> timeline; | 86 RefPtrWillBePersistent<AnimationTimeline> timeline; |
| 87 RefPtrWillBePersistent<AnimationPlayer> player; | 87 RefPtrWillBePersistent<AnimationPlayer> player; |
| 88 TrackExceptionState exceptionState; | 88 TrackExceptionState exceptionState; |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 TEST_F(AnimationAnimationPlayerTest, InitialState) | 91 TEST_F(AnimationAnimationPlayerTest, InitialState) |
| 92 { | 92 { |
| 93 setUpWithoutStartingTimeline(); | 93 setUpWithoutStartingTimeline(); |
| 94 player = timeline->createAnimationPlayer(0); | 94 player = timeline->createAnimationPlayer(0); |
| 95 EXPECT_EQ(0, player->currentTimeInternal()); | 95 EXPECT_EQ(0, player->currentTimeInternal()); |
| (...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 players.append(player1); | 728 players.append(player1); |
| 729 players.append(player3); | 729 players.append(player3); |
| 730 players.append(player4); | 730 players.append(player4); |
| 731 for (size_t i = 0; i < players.size(); i++) { | 731 for (size_t i = 0; i < players.size(); i++) { |
| 732 for (size_t j = 0; j < players.size(); j++) | 732 for (size_t j = 0; j < players.size(); j++) |
| 733 EXPECT_EQ(i < j, AnimationPlayer::hasLowerPriority(players[i].get(),
players[j].get())); | 733 EXPECT_EQ(i < j, AnimationPlayer::hasLowerPriority(players[i].get(),
players[j].get())); |
| 734 } | 734 } |
| 735 } | 735 } |
| 736 | 736 |
| 737 } | 737 } |
| OLD | NEW |