Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/css-parser/offset-parsing.html |
| diff --git a/third_party/WebKit/LayoutTests/css-parser/offset-parsing.html b/third_party/WebKit/LayoutTests/css-parser/offset-parsing.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..09a94a41cf6e1012969b77c88f56a702efc0a1fb |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/css-parser/offset-parsing.html |
| @@ -0,0 +1,24 @@ |
| +<!DOCTYPE html> |
| +<script src="../resources/testharness.js"></script> |
| +<script src="../resources/testharnessreport.js"></script> |
| +<script src="resources/property-parsing-test.js"></script> |
| +<script> |
| +// Verifies that offset shorthand values are properly parsed |
| + |
| +assert_valid_value("offset", "path('M 0 0 H 1') -200% auto"); |
| +assert_valid_value("offset", "path('M 0 0 H 1') reverse 30deg 50px", "path('M 0 0 H 1') 50px reverse 30deg"); |
| +assert_valid_value("offset", "path('M 0 0 H 1') auto", "path('M 0 0 H 1') 0px auto"); |
| +assert_valid_value("offset", "path('M 0 0 H 1') 30deg reverse", "path('M 0 0 H 1') 0px reverse 30deg"); |
| +assert_valid_value("offset", "path('M 0 0 H 1') -200%", "path('M 0 0 H 1') -200% auto"); |
| +assert_valid_value("offset", "path('M 0 0 H 1') 50px", "path('M 0 0 H 1') 50px auto"); |
| +assert_valid_value("offset", "path('M 0 0 H 1')", "path('M 0 0 H 1') 0px auto"); |
| +assert_invalid_value("offset", "center center path('M 0 0 L 100 100 M 100 200 L 200 200 Z L 300 300 Z') 100% 90deg/left bottom"); |
| +assert_invalid_value("offset", "100px"); |
| +assert_invalid_value("offset", "100px none auto 90deg"); |
| +assert_invalid_value("offset", "auto"); |
| +assert_invalid_value("offset", "30deg"); |
| +assert_invalid_value("offset", "30deg path('M 20 30 A 60 70 80')"); |
| +assert_invalid_value("offset", "auto 30deg 90px"); |
| +assert_invalid_value("offset", "none /"); |
| +assert_invalid_value("offset", "none / 10px 20px 30deg"); |
|
alancutter (OOO until 2018)
2016/10/04 05:02:05
Add negative test that has valid value with extra
Eric Willigers
2016/10/04 05:20:31
Done.
|
| +</script> |