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

Side by Side Diff: Source/core/animation/DoubleStyleInterpolationTest.cpp

Issue 1265853003: CSSValue Immediates: Immediates from all CSSPrimitiveValue constructors (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@tagged_ptrs_base
Patch Set: Created 5 years, 4 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 "config.h" 5 #include "config.h"
6 #include "core/animation/DoubleStyleInterpolation.h" 6 #include "core/animation/DoubleStyleInterpolation.h"
7 7
8 #include "core/css/CSSPrimitiveValue.h" 8 #include "core/css/CSSPrimitiveValue.h"
9 #include "core/css/CSSValueList.h" 9 #include "core/css/CSSValueList.h"
10 #include "core/css/StylePropertySet.h" 10 #include "core/css/StylePropertySet.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 { 114 {
115 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated() ; 115 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated() ;
116 list->append(CSSPrimitiveValue::create(0, CSSPrimitiveValue::CSS_DEG)); 116 list->append(CSSPrimitiveValue::create(0, CSSPrimitiveValue::CSS_DEG));
117 RefPtrWillBeRawPtr<CSSValue> value = roundTripMotionRotation(list.release(), false); 117 RefPtrWillBeRawPtr<CSSValue> value = roundTripMotionRotation(list.release(), false);
118 testValueListMotionRotation(value, 0, false); 118 testValueListMotionRotation(value, 0, false);
119 } 119 }
120 120
121 TEST_F(AnimationDoubleStyleInterpolationTest, ZeroValueAutoMotionRotation) 121 TEST_F(AnimationDoubleStyleInterpolationTest, ZeroValueAutoMotionRotation)
122 { 122 {
123 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated() ; 123 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated() ;
124 list->append(CSSPrimitiveValue::createIdentifier(CSSValueAuto)); 124 list->append(CSSPrimitiveValue::create(CSSValueAuto));
125 list->append(CSSPrimitiveValue::create(0, CSSPrimitiveValue::CSS_DEG)); 125 list->append(CSSPrimitiveValue::create(0, CSSPrimitiveValue::CSS_DEG));
126 RefPtrWillBeRawPtr<CSSValue> value = roundTripMotionRotation(list.release(), true); 126 RefPtrWillBeRawPtr<CSSValue> value = roundTripMotionRotation(list.release(), true);
127 testValueListMotionRotation(value, 0, true); 127 testValueListMotionRotation(value, 0, true);
128 } 128 }
129 129
130 TEST_F(AnimationDoubleStyleInterpolationTest, ValueFixedMotionRotation) 130 TEST_F(AnimationDoubleStyleInterpolationTest, ValueFixedMotionRotation)
131 { 131 {
132 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated() ; 132 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated() ;
133 list->append(CSSPrimitiveValue::create(90, CSSPrimitiveValue::CSS_DEG)); 133 list->append(CSSPrimitiveValue::create(90, CSSPrimitiveValue::CSS_DEG));
134 RefPtrWillBeRawPtr<CSSValue> value = roundTripMotionRotation(list.release(), false); 134 RefPtrWillBeRawPtr<CSSValue> value = roundTripMotionRotation(list.release(), false);
135 testValueListMotionRotation(value, 90, false); 135 testValueListMotionRotation(value, 90, false);
136 } 136 }
137 137
138 TEST_F(AnimationDoubleStyleInterpolationTest, ValueAutoMotionRotation) 138 TEST_F(AnimationDoubleStyleInterpolationTest, ValueAutoMotionRotation)
139 { 139 {
140 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated() ; 140 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated() ;
141 list->append(CSSPrimitiveValue::createIdentifier(CSSValueAuto)); 141 list->append(CSSPrimitiveValue::create(CSSValueAuto));
142 list->append(CSSPrimitiveValue::create(90, CSSPrimitiveValue::CSS_DEG)); 142 list->append(CSSPrimitiveValue::create(90, CSSPrimitiveValue::CSS_DEG));
143 RefPtrWillBeRawPtr<CSSValue> value = roundTripMotionRotation(list.release(), true); 143 RefPtrWillBeRawPtr<CSSValue> value = roundTripMotionRotation(list.release(), true);
144 testValueListMotionRotation(value, 90, true); 144 testValueListMotionRotation(value, 90, true);
145 } 145 }
146 146
147 } 147 }
OLDNEW
« no previous file with comments | « Source/core/animation/DoubleStyleInterpolation.cpp ('k') | Source/core/animation/ListStyleInterpolationTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698