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

Side by Side Diff: Source/core/animation/TimedItemTest.cpp

Issue 46043014: Web Animations CSS: Unfreeze AnimationClock if sampling timelines does not trigger style recalc (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Reinstate assert Created 7 years, 1 month 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 | Annotate | Revision Log
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 { 68 {
69 return adoptRef(new TestTimedItem(specified, new TestTimedItemEventDeleg ate())); 69 return adoptRef(new TestTimedItem(specified, new TestTimedItemEventDeleg ate()));
70 } 70 }
71 71
72 void updateInheritedTime(double time) 72 void updateInheritedTime(double time)
73 { 73 {
74 m_eventDelegate->reset(); 74 m_eventDelegate->reset();
75 TimedItem::updateInheritedTime(time); 75 TimedItem::updateInheritedTime(time);
76 } 76 }
77 77
78 void updateChildrenAndEffects() const FINAL OVERRIDE { } 78 bool updateChildrenAndEffects() const FINAL OVERRIDE { return false; }
79 void willDetach() { } 79 void willDetach() { }
80 TestTimedItemEventDelegate* eventDelegate() { return m_eventDelegate; } 80 TestTimedItemEventDelegate* eventDelegate() { return m_eventDelegate; }
81 double calculateTimeToEffectChange(double inheritedTime, double activeTime, Phase) const FINAL OVERRIDE { return -1; } 81 double calculateTimeToEffectChange(double inheritedTime, double activeTime, Phase) const FINAL OVERRIDE { return -1; }
82 82
83 private: 83 private:
84 TestTimedItem(const Timing& specified, TestTimedItemEventDelegate* eventDele gate) 84 TestTimedItem(const Timing& specified, TestTimedItemEventDelegate* eventDele gate)
85 : TimedItem(specified, adoptPtr(eventDelegate)) 85 : TimedItem(specified, adoptPtr(eventDelegate))
86 , m_eventDelegate(eventDelegate) 86 , m_eventDelegate(eventDelegate)
87 { 87 {
88 } 88 }
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 // After end 568 // After end
569 timedItem->updateInheritedTime(3.5); 569 timedItem->updateInheritedTime(3.5);
570 ASSERT_TRUE(timedItem->eventDelegate()->eventTriggered()); 570 ASSERT_TRUE(timedItem->eventDelegate()->eventTriggered());
571 EXPECT_TRUE(timedItem->eventDelegate()->phaseChanged()); 571 EXPECT_TRUE(timedItem->eventDelegate()->phaseChanged());
572 EXPECT_FALSE(timedItem->eventDelegate()->iterationChanged()); 572 EXPECT_FALSE(timedItem->eventDelegate()->iterationChanged());
573 573
574 timedItem->updateInheritedTime(3.6); 574 timedItem->updateInheritedTime(3.6);
575 ASSERT_FALSE(timedItem->eventDelegate()->eventTriggered()); 575 ASSERT_FALSE(timedItem->eventDelegate()->eventTriggered());
576 } 576 }
577 } 577 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698