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

Side by Side Diff: third_party/WebKit/Source/core/css/parser/CSSParserFastPathsTest.cpp

Issue 1996343003: Add an early abort for the CSSParserFastPaths transform path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Handle missing parens correctly. Created 4 years, 6 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 | « third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/css/parser/CSSParserFastPaths.h" 5 #include "core/css/parser/CSSParserFastPaths.h"
6 6
7 #include "core/css/CSSPrimitiveValue.h" 7 #include "core/css/CSSPrimitiveValue.h"
8 #include "core/css/CSSValueList.h" 8 #include "core/css/CSSValueList.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 } 75 }
76 76
77 TEST(CSSParserFastPathsTest, ParseTransformNotFastPath) 77 TEST(CSSParserFastPathsTest, ParseTransformNotFastPath)
78 { 78 {
79 CSSValue* value = CSSParserFastPaths::maybeParseValue(CSSPropertyTransform, "rotateX(1deg)", HTMLStandardMode); 79 CSSValue* value = CSSParserFastPaths::maybeParseValue(CSSPropertyTransform, "rotateX(1deg)", HTMLStandardMode);
80 ASSERT_EQ(nullptr, value); 80 ASSERT_EQ(nullptr, value);
81 value = CSSParserFastPaths::maybeParseValue(CSSPropertyTransform, "translate Z(1px) rotateX(1deg)", HTMLStandardMode); 81 value = CSSParserFastPaths::maybeParseValue(CSSPropertyTransform, "translate Z(1px) rotateX(1deg)", HTMLStandardMode);
82 ASSERT_EQ(nullptr, value); 82 ASSERT_EQ(nullptr, value);
83 } 83 }
84 84
85 TEST(CSSParserFastPathsTest, ParseInvalidTransform)
86 {
87 CSSValue* value = CSSParserFastPaths::maybeParseValue(CSSPropertyTransform, "rotateX(1deg", HTMLStandardMode);
88 ASSERT_EQ(nullptr, value);
89 value = CSSParserFastPaths::maybeParseValue(CSSPropertyTransform, "translate Z(1px) (1px, 1px) rotateX(1deg", HTMLStandardMode);
90 ASSERT_EQ(nullptr, value);
91 }
92
85 } // namespace blink 93 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698