OLD | NEW |
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/LengthStyleInterpolation.h" | 5 #include "core/animation/LengthStyleInterpolation.h" |
6 | 6 |
7 #include "core/css/CSSPrimitiveValue.h" | 7 #include "core/css/CSSPrimitiveValue.h" |
8 #include "core/css/StylePropertySet.h" | 8 #include "core/css/StylePropertySet.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 CSSLengthArray expectation, actual; | 160 CSSLengthArray expectation, actual; |
161 initLengthArray(expectation); | 161 initLengthArray(expectation); |
162 OwnPtr<InterpolableList> result = InterpolableList::create(2); | 162 OwnPtr<InterpolableList> result = InterpolableList::create(2); |
163 result->set(0, createInterpolableLength(0, 10, 0, 10, 0, 10, 0, 10, 0, 10)); | 163 result->set(0, createInterpolableLength(0, 10, 0, 10, 0, 10, 0, 10, 0, 10)); |
164 result->set(1, createInterpolableLength(1, 1, 1, 1, 0, 1, 0, 1, 1, 1)); | 164 result->set(1, createInterpolableLength(1, 1, 1, 1, 0, 1, 0, 1, 1, 1)); |
165 toCSSPrimitiveValue(interpolableValueToLength(result.get(), RangeAll).get())
->accumulateLengthArray(expectation); | 165 toCSSPrimitiveValue(interpolableValueToLength(result.get(), RangeAll).get())
->accumulateLengthArray(expectation); |
166 setLengthArray(actual, "calc(0px + 10% + 0em + 10ex + 10ch + 10vh + 0vmin +
10vmax)"); | 166 setLengthArray(actual, "calc(0px + 10% + 0em + 10ex + 10ch + 10vh + 0vmin +
10vmax)"); |
167 EXPECT_CSS_LENGTH_ARRAY_ELEMENTS_EQUAL(expectation, actual); | 167 EXPECT_CSS_LENGTH_ARRAY_ELEMENTS_EQUAL(expectation, actual); |
168 } | 168 } |
169 | 169 |
170 } | 170 } // namespace blink |
OLD | NEW |