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

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

Issue 2330283004: Fix serialization of step timing functions (Closed)
Patch Set: Update step timing function parsing in devtools 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 // 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 timingFunctionThrows("", exceptionState); 89 timingFunctionThrows("", exceptionState);
90 timingFunctionThrows("initial", exceptionState); 90 timingFunctionThrows("initial", exceptionState);
91 timingFunctionThrows("inherit", exceptionState); 91 timingFunctionThrows("inherit", exceptionState);
92 timingFunctionThrows("unset", exceptionState); 92 timingFunctionThrows("unset", exceptionState);
93 93
94 timingFunctionRoundTrips("ease", exceptionState); 94 timingFunctionRoundTrips("ease", exceptionState);
95 timingFunctionRoundTrips("linear", exceptionState); 95 timingFunctionRoundTrips("linear", exceptionState);
96 timingFunctionRoundTrips("ease-in", exceptionState); 96 timingFunctionRoundTrips("ease-in", exceptionState);
97 timingFunctionRoundTrips("ease-out", exceptionState); 97 timingFunctionRoundTrips("ease-out", exceptionState);
98 timingFunctionRoundTrips("ease-in-out", exceptionState); 98 timingFunctionRoundTrips("ease-in-out", exceptionState);
99 timingFunctionRoundTrips("step-start", exceptionState);
100 timingFunctionRoundTrips("step-middle", exceptionState);
101 timingFunctionRoundTrips("step-end", exceptionState);
102 timingFunctionRoundTrips("steps(3, start)", exceptionState);
103 timingFunctionRoundTrips("steps(3, middle)", exceptionState);
104 timingFunctionRoundTrips("steps(3, end)", exceptionState);
105 timingFunctionRoundTrips("cubic-bezier(0.1, 5, 0.23, 0)", exceptionState); 99 timingFunctionRoundTrips("cubic-bezier(0.1, 5, 0.23, 0)", exceptionState);
106 100
107 EXPECT_EQ("steps(3, end)", parseTimingFunction("steps(3)", exceptionState)-> toString()); 101 EXPECT_EQ("steps(1, start)", parseTimingFunction("step-start", exceptionStat e)->toString());
102 EXPECT_EQ("steps(1, middle)", parseTimingFunction("step-middle", exceptionSt ate)->toString());
103 EXPECT_EQ("steps(1)", parseTimingFunction("step-end", exceptionState)->toStr ing());
104 EXPECT_EQ("steps(3, start)", parseTimingFunction("steps(3, start)", exceptio nState)->toString());
105 EXPECT_EQ("steps(3, middle)", parseTimingFunction("steps(3, middle)", except ionState)->toString());
106 EXPECT_EQ("steps(3)", parseTimingFunction("steps(3, end)", exceptionState)-> toString());
107 EXPECT_EQ("steps(3)", parseTimingFunction("steps(3)", exceptionState)->toStr ing());
108 108
109 timingFunctionThrows("steps(3, nowhere)", exceptionState); 109 timingFunctionThrows("steps(3, nowhere)", exceptionState);
110 timingFunctionThrows("steps(-3, end)", exceptionState); 110 timingFunctionThrows("steps(-3, end)", exceptionState);
111 timingFunctionThrows("cubic-bezier(0.1, 0, 4, 0.4)", exceptionState); 111 timingFunctionThrows("cubic-bezier(0.1, 0, 4, 0.4)", exceptionState);
112 } 112 }
113 113
114 } // namespace blink 114 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698