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

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

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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 /* 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 TEST_F(AnimationAnimatableUnknownTest, Create) { 55 TEST_F(AnimationAnimatableUnknownTest, Create) {
56 EXPECT_TRUE(animatableUnknown); 56 EXPECT_TRUE(animatableUnknown);
57 } 57 }
58 58
59 TEST_F(AnimationAnimatableUnknownTest, ToCSSValue) { 59 TEST_F(AnimationAnimatableUnknownTest, ToCSSValue) {
60 EXPECT_EQ(cssValue, 60 EXPECT_EQ(cssValue,
61 toAnimatableUnknown(animatableUnknown.get())->toCSSValue()); 61 toAnimatableUnknown(animatableUnknown.get())->toCSSValue());
62 } 62 }
63 63
64 TEST_F(AnimationAnimatableUnknownTest, Interpolate) { 64 TEST_F(AnimationAnimatableUnknownTest, Interpolate) {
65 EXPECT_EQ(cssValue, toAnimatableUnknown(AnimatableValue::interpolate( 65 EXPECT_EQ(cssValue,
66 animatableUnknown.get(), 66 toAnimatableUnknown(
67 otherAnimatableUnknown.get(), 0) 67 AnimatableValue::interpolate(animatableUnknown.get(),
68 .get()) 68 otherAnimatableUnknown.get(), 0)
69 ->toCSSValue()); 69 .get())
70 EXPECT_EQ(cssValue, toAnimatableUnknown(AnimatableValue::interpolate( 70 ->toCSSValue());
71 animatableUnknown.get(), 71 EXPECT_EQ(cssValue,
72 otherAnimatableUnknown.get(), 0.4) 72 toAnimatableUnknown(
73 .get()) 73 AnimatableValue::interpolate(animatableUnknown.get(),
74 ->toCSSValue()); 74 otherAnimatableUnknown.get(), 0.4)
75 .get())
76 ->toCSSValue());
75 EXPECT_EQ(otherCSSValue, 77 EXPECT_EQ(otherCSSValue,
76 toAnimatableUnknown( 78 toAnimatableUnknown(
77 AnimatableValue::interpolate(animatableUnknown.get(), 79 AnimatableValue::interpolate(animatableUnknown.get(),
78 otherAnimatableUnknown.get(), 0.5) 80 otherAnimatableUnknown.get(), 0.5)
79 .get()) 81 .get())
80 ->toCSSValue()); 82 ->toCSSValue());
81 EXPECT_EQ(otherCSSValue, 83 EXPECT_EQ(otherCSSValue,
82 toAnimatableUnknown( 84 toAnimatableUnknown(
83 AnimatableValue::interpolate(animatableUnknown.get(), 85 AnimatableValue::interpolate(animatableUnknown.get(),
84 otherAnimatableUnknown.get(), 0.6) 86 otherAnimatableUnknown.get(), 0.6)
85 .get()) 87 .get())
86 ->toCSSValue()); 88 ->toCSSValue());
87 EXPECT_EQ(otherCSSValue, 89 EXPECT_EQ(otherCSSValue,
88 toAnimatableUnknown( 90 toAnimatableUnknown(
89 AnimatableValue::interpolate(animatableUnknown.get(), 91 AnimatableValue::interpolate(animatableUnknown.get(),
90 otherAnimatableUnknown.get(), 1) 92 otherAnimatableUnknown.get(), 1)
91 .get()) 93 .get())
92 ->toCSSValue()); 94 ->toCSSValue());
93 95
94 EXPECT_EQ(otherCSSValue, toAnimatableUnknown(AnimatableValue::interpolate( 96 EXPECT_EQ(otherCSSValue,
95 otherAnimatableUnknown.get(), 97 toAnimatableUnknown(
96 animatableUnknown.get(), 0) 98 AnimatableValue::interpolate(otherAnimatableUnknown.get(),
97 .get()) 99 animatableUnknown.get(), 0)
98 ->toCSSValue()); 100 .get())
99 EXPECT_EQ(otherCSSValue, toAnimatableUnknown(AnimatableValue::interpolate( 101 ->toCSSValue());
100 otherAnimatableUnknown.get(), 102 EXPECT_EQ(otherCSSValue,
101 animatableUnknown.get(), 0.4) 103 toAnimatableUnknown(
102 .get()) 104 AnimatableValue::interpolate(otherAnimatableUnknown.get(),
103 ->toCSSValue()); 105 animatableUnknown.get(), 0.4)
104 EXPECT_EQ(cssValue, toAnimatableUnknown(AnimatableValue::interpolate( 106 .get())
105 otherAnimatableUnknown.get(), 107 ->toCSSValue());
106 animatableUnknown.get(), 0.5) 108 EXPECT_EQ(cssValue,
107 .get()) 109 toAnimatableUnknown(
108 ->toCSSValue()); 110 AnimatableValue::interpolate(otherAnimatableUnknown.get(),
109 EXPECT_EQ(cssValue, toAnimatableUnknown(AnimatableValue::interpolate( 111 animatableUnknown.get(), 0.5)
110 otherAnimatableUnknown.get(), 112 .get())
111 animatableUnknown.get(), 0.6) 113 ->toCSSValue());
112 .get()) 114 EXPECT_EQ(cssValue,
113 ->toCSSValue()); 115 toAnimatableUnknown(
114 EXPECT_EQ(cssValue, toAnimatableUnknown(AnimatableValue::interpolate( 116 AnimatableValue::interpolate(otherAnimatableUnknown.get(),
115 otherAnimatableUnknown.get(), 117 animatableUnknown.get(), 0.6)
116 animatableUnknown.get(), 1) 118 .get())
117 .get()) 119 ->toCSSValue());
118 ->toCSSValue()); 120 EXPECT_EQ(cssValue,
121 toAnimatableUnknown(
122 AnimatableValue::interpolate(otherAnimatableUnknown.get(),
123 animatableUnknown.get(), 1)
124 .get())
125 ->toCSSValue());
119 } 126 }
120 127
121 } // namespace blink 128 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698