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

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

Issue 2775143002: Implement frames() timing function (Closed)
Patch Set: Created 3 years, 8 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/animation/AnimationInputHelpers.h" 5 #include "core/animation/AnimationInputHelpers.h"
6 6
7 #include "core/dom/Element.h" 7 #include "core/dom/Element.h"
8 #include "core/dom/ExceptionCode.h" 8 #include "core/dom/ExceptionCode.h"
9 #include "core/testing/DummyPageHolder.h" 9 #include "core/testing/DummyPageHolder.h"
10 #include "platform/animation/TimingFunction.h" 10 #include "platform/animation/TimingFunction.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 timingFunctionThrows("", exceptionState); 106 timingFunctionThrows("", exceptionState);
107 timingFunctionThrows("initial", exceptionState); 107 timingFunctionThrows("initial", exceptionState);
108 timingFunctionThrows("inherit", exceptionState); 108 timingFunctionThrows("inherit", exceptionState);
109 timingFunctionThrows("unset", exceptionState); 109 timingFunctionThrows("unset", exceptionState);
110 110
111 timingFunctionRoundTrips("ease", exceptionState); 111 timingFunctionRoundTrips("ease", exceptionState);
112 timingFunctionRoundTrips("linear", exceptionState); 112 timingFunctionRoundTrips("linear", exceptionState);
113 timingFunctionRoundTrips("ease-in", exceptionState); 113 timingFunctionRoundTrips("ease-in", exceptionState);
114 timingFunctionRoundTrips("ease-out", exceptionState); 114 timingFunctionRoundTrips("ease-out", exceptionState);
115 timingFunctionRoundTrips("ease-in-out", exceptionState); 115 timingFunctionRoundTrips("ease-in-out", exceptionState);
116 timingFunctionRoundTrips("frames(3)", exceptionState);
116 timingFunctionRoundTrips("cubic-bezier(0.1, 5, 0.23, 0)", exceptionState); 117 timingFunctionRoundTrips("cubic-bezier(0.1, 5, 0.23, 0)", exceptionState);
117 118
118 EXPECT_EQ("steps(1, start)", 119 EXPECT_EQ("steps(1, start)",
119 parseTimingFunction("step-start", exceptionState)->toString()); 120 parseTimingFunction("step-start", exceptionState)->toString());
120 EXPECT_EQ("steps(1, middle)", 121 EXPECT_EQ("steps(1, middle)",
121 parseTimingFunction("step-middle", exceptionState)->toString()); 122 parseTimingFunction("step-middle", exceptionState)->toString());
122 EXPECT_EQ("steps(1)", 123 EXPECT_EQ("steps(1)",
123 parseTimingFunction("step-end", exceptionState)->toString()); 124 parseTimingFunction("step-end", exceptionState)->toString());
124 EXPECT_EQ("steps(3, start)", 125 EXPECT_EQ("steps(3, start)",
125 parseTimingFunction("steps(3, start)", exceptionState)->toString()); 126 parseTimingFunction("steps(3, start)", exceptionState)->toString());
126 EXPECT_EQ( 127 EXPECT_EQ(
127 "steps(3, middle)", 128 "steps(3, middle)",
128 parseTimingFunction("steps(3, middle)", exceptionState)->toString()); 129 parseTimingFunction("steps(3, middle)", exceptionState)->toString());
129 EXPECT_EQ("steps(3)", 130 EXPECT_EQ("steps(3)",
130 parseTimingFunction("steps(3, end)", exceptionState)->toString()); 131 parseTimingFunction("steps(3, end)", exceptionState)->toString());
131 EXPECT_EQ("steps(3)", 132 EXPECT_EQ("steps(3)",
132 parseTimingFunction("steps(3)", exceptionState)->toString()); 133 parseTimingFunction("steps(3)", exceptionState)->toString());
133 134
134 timingFunctionThrows("steps(3, nowhere)", exceptionState); 135 timingFunctionThrows("steps(3, nowhere)", exceptionState);
135 timingFunctionThrows("steps(-3, end)", exceptionState); 136 timingFunctionThrows("steps(-3, end)", exceptionState);
137 timingFunctionThrows("frames(3, end)", exceptionState);
138 timingFunctionThrows("frames(1)", exceptionState);
136 timingFunctionThrows("cubic-bezier(0.1, 0, 4, 0.4)", exceptionState); 139 timingFunctionThrows("cubic-bezier(0.1, 0, 4, 0.4)", exceptionState);
137 } 140 }
138 141
139 } // namespace blink 142 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698