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

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

Issue 1303173007: Oilpan: Unship Oilpan from CSSValues Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
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/DeferredLegacyStyleInterpolation.h" 6 #include "core/animation/DeferredLegacyStyleInterpolation.h"
7 7
8 #include "core/css/CSSInheritedValue.h" 8 #include "core/css/CSSInheritedValue.h"
9 #include "core/css/CSSPrimitiveValue.h" 9 #include "core/css/CSSPrimitiveValue.h"
10 #include "core/css/CSSValueList.h" 10 #include "core/css/CSSValueList.h"
11 #include "core/css/StylePropertySet.h" 11 #include "core/css/StylePropertySet.h"
12 #include "core/css/parser/CSSParser.h" 12 #include "core/css/parser/CSSParser.h"
13 13
14 #include <gtest/gtest.h> 14 #include <gtest/gtest.h>
15 15
16 namespace blink { 16 namespace blink {
17 17
18 class AnimationDeferredLegacyStyleInterpolationTest : public ::testing::Test { 18 class AnimationDeferredLegacyStyleInterpolationTest : public ::testing::Test {
19 protected: 19 protected:
20 static bool test(CSSPropertyID propertyID, const String& string) 20 static bool test(CSSPropertyID propertyID, const String& string)
21 { 21 {
22 CSSParserMode parserMode = HTMLStandardMode; 22 CSSParserMode parserMode = HTMLStandardMode;
23 if (propertyID == CSSPropertyFloodColor) 23 if (propertyID == CSSPropertyFloodColor)
24 parserMode = SVGAttributeMode; 24 parserMode = SVGAttributeMode;
25 RefPtrWillBeRawPtr<CSSValue> value = CSSParser::parseSingleValue(propert yID, string, CSSParserContext(parserMode, 0)); 25 RefPtr<CSSValue> value = CSSParser::parseSingleValue(propertyID, string, CSSParserContext(parserMode, 0));
26 ASSERT(value); 26 ASSERT(value);
27 return DeferredLegacyStyleInterpolation::interpolationRequiresStyleResol ve(*value); 27 return DeferredLegacyStyleInterpolation::interpolationRequiresStyleResol ve(*value);
28 } 28 }
29 }; 29 };
30 30
31 TEST_F(AnimationDeferredLegacyStyleInterpolationTest, Inherit) 31 TEST_F(AnimationDeferredLegacyStyleInterpolationTest, Inherit)
32 { 32 {
33 EXPECT_TRUE(test(CSSPropertyCaptionSide, "inherit")); 33 EXPECT_TRUE(test(CSSPropertyCaptionSide, "inherit"));
34 } 34 }
35 35
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 EXPECT_TRUE(test(CSSPropertyWebkitFilter, "drop-shadow(0px 0px 0px currentco lor)")); 84 EXPECT_TRUE(test(CSSPropertyWebkitFilter, "drop-shadow(0px 0px 0px currentco lor)"));
85 EXPECT_FALSE(test(CSSPropertyWebkitFilter, "opacity(1)")); 85 EXPECT_FALSE(test(CSSPropertyWebkitFilter, "opacity(1)"));
86 EXPECT_FALSE(test(CSSPropertyWebkitFilter, "saturate(0)")); 86 EXPECT_FALSE(test(CSSPropertyWebkitFilter, "saturate(0)"));
87 EXPECT_FALSE(test(CSSPropertyWebkitFilter, "grayscale(1)")); 87 EXPECT_FALSE(test(CSSPropertyWebkitFilter, "grayscale(1)"));
88 EXPECT_FALSE(test(CSSPropertyWebkitFilter, "invert(1)")); 88 EXPECT_FALSE(test(CSSPropertyWebkitFilter, "invert(1)"));
89 EXPECT_FALSE(test(CSSPropertyWebkitFilter, "sepia(1)")); 89 EXPECT_FALSE(test(CSSPropertyWebkitFilter, "sepia(1)"));
90 EXPECT_TRUE(test(CSSPropertyWebkitFilter, "url(#svgfilter)")); 90 EXPECT_TRUE(test(CSSPropertyWebkitFilter, "url(#svgfilter)"));
91 } 91 }
92 92
93 } 93 }
OLDNEW
« no previous file with comments | « Source/core/animation/DeferredLegacyStyleInterpolation.cpp ('k') | Source/core/animation/DoubleStyleInterpolation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698