| 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 "config.h" | 5 #include "config.h" |
| 6 #include "core/animation/LengthPoint3DStyleInterpolation.h" | 6 #include "core/animation/LengthPoint3DStyleInterpolation.h" |
| 7 | 7 |
| 8 #include "core/animation/LengthStyleInterpolation.h" | 8 #include "core/animation/LengthStyleInterpolation.h" |
| 9 #include "core/css/CSSCalculationValue.h" | 9 #include "core/css/CSSCalculationValue.h" |
| 10 #include "core/css/StylePropertySet.h" | 10 #include "core/css/StylePropertySet.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 } | 51 } |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 TEST_F(AnimationLengthPoint3DStyleInterpolationTest, ZeroPoint3D) | 54 TEST_F(AnimationLengthPoint3DStyleInterpolationTest, ZeroPoint3D) |
| 55 { | 55 { |
| 56 RefPtrWillBeRawPtr<CSSValueList> lengthPoint3D = CSSValueList::createCommaSe
parated(); | 56 RefPtrWillBeRawPtr<CSSValueList> lengthPoint3D = CSSValueList::createCommaSe
parated(); |
| 57 lengthPoint3D->append(CSSPrimitiveValue::create(0, CSSPrimitiveValue::CSS_PX
)); | 57 lengthPoint3D->append(CSSPrimitiveValue::create(0, CSSPrimitiveValue::CSS_PX
)); |
| 58 lengthPoint3D->append(CSSPrimitiveValue::create(0, CSSPrimitiveValue::CSS_EM
S)); | 58 lengthPoint3D->append(CSSPrimitiveValue::create(0, CSSPrimitiveValue::CSS_EM
S)); |
| 59 lengthPoint3D->append(CSSPrimitiveValue::create(0, CSSPrimitiveValue::CSS_PE
RCENTAGE)); | 59 lengthPoint3D->append(CSSPrimitiveValue::create(0, CSSPrimitiveValue::CSS_PE
RCENTAGE)); |
| 60 RefPtrWillBeRawPtr<CSSValue> value = roundTrip(lengthPoint3D.release()); | 60 RefPtrWillBeRawPtr<CSSValue> value = roundTrip(lengthPoint3D.release()); |
| 61 testPrimitiveValue(value, 0, 0, 0, CSSPrimitiveValue::CSS_PX, CSSPrimitiveVa
lue::CSS_PX, CSSPrimitiveValue::CSS_PX); | 61 testPrimitiveValue(value, 0, 0, 0, CSSPrimitiveValue::CSS_PX, CSSPrimitiveVa
lue::CSS_EMS, CSSPrimitiveValue::CSS_PERCENTAGE); |
| 62 } | 62 } |
| 63 | 63 |
| 64 TEST_F(AnimationLengthPoint3DStyleInterpolationTest, SingleUnitPoint3D) | 64 TEST_F(AnimationLengthPoint3DStyleInterpolationTest, SingleUnitPoint3D) |
| 65 { | 65 { |
| 66 RefPtrWillBeRawPtr<CSSValueList> lengthPoint3D = CSSValueList::createCommaSe
parated(); | 66 RefPtrWillBeRawPtr<CSSValueList> lengthPoint3D = CSSValueList::createCommaSe
parated(); |
| 67 lengthPoint3D->append(CSSPrimitiveValue::create(10, CSSPrimitiveValue::CSS_P
X)); | 67 lengthPoint3D->append(CSSPrimitiveValue::create(10, CSSPrimitiveValue::CSS_P
X)); |
| 68 lengthPoint3D->append(CSSPrimitiveValue::create(10, CSSPrimitiveValue::CSS_P
ERCENTAGE)); | 68 lengthPoint3D->append(CSSPrimitiveValue::create(10, CSSPrimitiveValue::CSS_P
ERCENTAGE)); |
| 69 lengthPoint3D->append(CSSPrimitiveValue::create(10, CSSPrimitiveValue::CSS_E
MS)); | 69 lengthPoint3D->append(CSSPrimitiveValue::create(10, CSSPrimitiveValue::CSS_E
MS)); |
| 70 RefPtrWillBeRawPtr<CSSValue> value = roundTrip(lengthPoint3D.release()); | 70 RefPtrWillBeRawPtr<CSSValue> value = roundTrip(lengthPoint3D.release()); |
| 71 testPrimitiveValue(value, 10, 10, 10, CSSPrimitiveValue::CSS_PX, CSSPrimitiv
eValue::CSS_PERCENTAGE, CSSPrimitiveValue::CSS_EMS); | 71 testPrimitiveValue(value, 10, 10, 10, CSSPrimitiveValue::CSS_PX, CSSPrimitiv
eValue::CSS_PERCENTAGE, CSSPrimitiveValue::CSS_EMS); |
| 72 } | 72 } |
| 73 | 73 |
| 74 TEST_F(AnimationLengthPoint3DStyleInterpolationTest, MultipleValuePoint3D) | 74 TEST_F(AnimationLengthPoint3DStyleInterpolationTest, MultipleValuePoint3D) |
| 75 { | 75 { |
| 76 RefPtrWillBeRawPtr<CSSValueList> lengthPoint3DPx = CSSValueList::createComma
Separated(); | 76 RefPtrWillBeRawPtr<CSSValueList> lengthPoint3DPx = CSSValueList::createComma
Separated(); |
| 77 lengthPoint3DPx->append(CSSPrimitiveValue::create(10, CSSPrimitiveValue::CSS
_PX)); | 77 lengthPoint3DPx->append(CSSPrimitiveValue::create(10, CSSPrimitiveValue::CSS
_PX)); |
| 78 lengthPoint3DPx->append(CSSPrimitiveValue::create(30, CSSPrimitiveValue::CSS
_PERCENTAGE)); | 78 lengthPoint3DPx->append(CSSPrimitiveValue::create(30, CSSPrimitiveValue::CSS
_PERCENTAGE)); |
| 79 lengthPoint3DPx->append(CSSPrimitiveValue::create(20, CSSPrimitiveValue::CSS
_EMS)); | 79 lengthPoint3DPx->append(CSSPrimitiveValue::create(20, CSSPrimitiveValue::CSS
_EMS)); |
| 80 RefPtrWillBeRawPtr<CSSValue> value = roundTrip(lengthPoint3DPx.release()); | 80 RefPtrWillBeRawPtr<CSSValue> value = roundTrip(lengthPoint3DPx.release()); |
| 81 testPrimitiveValue(value, 10, 30, 20, CSSPrimitiveValue::CSS_PX, CSSPrimitiv
eValue::CSS_PERCENTAGE, CSSPrimitiveValue::CSS_EMS); | 81 testPrimitiveValue(value, 10, 30, 20, CSSPrimitiveValue::CSS_PX, CSSPrimitiv
eValue::CSS_PERCENTAGE, CSSPrimitiveValue::CSS_EMS); |
| 82 } | 82 } |
| 83 | 83 |
| 84 } | 84 } |
| OLD | NEW |