| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |