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

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

Issue 2101143005: 0 -> nullptr for UseCounter pointer in CSSParserContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Typo Created 4 years, 5 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "core/animation/DeferredLegacyStyleInterpolation.h" 5 #include "core/animation/DeferredLegacyStyleInterpolation.h"
6 6
7 #include "core/css/CSSInheritedValue.h" 7 #include "core/css/CSSInheritedValue.h"
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"
11 #include "core/css/parser/CSSParser.h" 11 #include "core/css/parser/CSSParser.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class AnimationDeferredLegacyStyleInterpolationTest : public ::testing::Test { 16 class AnimationDeferredLegacyStyleInterpolationTest : public ::testing::Test {
17 protected: 17 protected:
18 static bool test(CSSPropertyID propertyID, const String& string) 18 static bool test(CSSPropertyID propertyID, const String& string)
19 { 19 {
20 CSSParserMode parserMode = HTMLStandardMode; 20 CSSParserMode parserMode = HTMLStandardMode;
21 if (propertyID == CSSPropertyFloodColor) 21 if (propertyID == CSSPropertyFloodColor)
22 parserMode = SVGAttributeMode; 22 parserMode = SVGAttributeMode;
23 CSSValue* value = CSSParser::parseSingleValue(propertyID, string, CSSPar serContext(parserMode, 0)); 23 CSSValue* value = CSSParser::parseSingleValue(propertyID, string, CSSPar serContext(parserMode, nullptr));
24 ASSERT(value); 24 ASSERT(value);
25 return DeferredLegacyStyleInterpolation::interpolationRequiresStyleResol ve(*value); 25 return DeferredLegacyStyleInterpolation::interpolationRequiresStyleResol ve(*value);
26 } 26 }
27 }; 27 };
28 28
29 TEST_F(AnimationDeferredLegacyStyleInterpolationTest, Inherit) 29 TEST_F(AnimationDeferredLegacyStyleInterpolationTest, Inherit)
30 { 30 {
31 EXPECT_TRUE(test(CSSPropertyCaptionSide, "inherit")); 31 EXPECT_TRUE(test(CSSPropertyCaptionSide, "inherit"));
32 } 32 }
33 33
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 EXPECT_TRUE(test(CSSPropertyBackdropFilter, "drop-shadow(20px 10vw green)")) ; 98 EXPECT_TRUE(test(CSSPropertyBackdropFilter, "drop-shadow(20px 10vw green)")) ;
99 EXPECT_TRUE(test(CSSPropertyBackdropFilter, "drop-shadow(0px 0px 0px current color)")); 99 EXPECT_TRUE(test(CSSPropertyBackdropFilter, "drop-shadow(0px 0px 0px current color)"));
100 EXPECT_FALSE(test(CSSPropertyBackdropFilter, "opacity(1)")); 100 EXPECT_FALSE(test(CSSPropertyBackdropFilter, "opacity(1)"));
101 EXPECT_FALSE(test(CSSPropertyBackdropFilter, "saturate(0)")); 101 EXPECT_FALSE(test(CSSPropertyBackdropFilter, "saturate(0)"));
102 EXPECT_FALSE(test(CSSPropertyBackdropFilter, "grayscale(1)")); 102 EXPECT_FALSE(test(CSSPropertyBackdropFilter, "grayscale(1)"));
103 EXPECT_FALSE(test(CSSPropertyBackdropFilter, "invert(1)")); 103 EXPECT_FALSE(test(CSSPropertyBackdropFilter, "invert(1)"));
104 EXPECT_FALSE(test(CSSPropertyBackdropFilter, "sepia(1)")); 104 EXPECT_FALSE(test(CSSPropertyBackdropFilter, "sepia(1)"));
105 EXPECT_TRUE(test(CSSPropertyBackdropFilter, "url(#svgfilter)")); 105 EXPECT_TRUE(test(CSSPropertyBackdropFilter, "url(#svgfilter)"));
106 } 106 }
107 } // namespace blink 107 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698