mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 13:02:09 +02:00
Tests: Import CSS clip-path: path(...) tests
This commit is contained in:
committed by
Alexander Kalenik
parent
1bf4d3391e
commit
07b5b7ffb6
Notes:
github-actions[bot]
2025-07-17 18:00:52 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/07b5b7ffb6c Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5491 Reviewed-by: https://github.com/kalenikaliaksandr ✅
@@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Shapes Module Level 1: the computed value of the path() function</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-shapes-1/#funcdef-basic-shape-path">
|
||||
<meta name="assert" content="Tests parsing of the path() function">
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script src="../../../css/support/computed-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value("clip-path", "path(nonzero, 'M10,10h80v80h-80zM25,25h50v50h-50z')", "path(\"M 10 10 h 80 v 80 h -80 Z M 25 25 h 50 v 50 h -50 Z\")");
|
||||
test_computed_value("clip-path", "path(evenodd, 'M10,10h80v80h-80zM25,25h50v50h-50z')", "path(evenodd, \"M 10 10 h 80 v 80 h -80 Z M 25 25 h 50 v 50 h -50 Z\")");
|
||||
test_computed_value("clip-path", "path(evenodd, 'M10,10h80v80h-80zM25,25h50v50h-50')", "path(evenodd, \"M 10 10 h 80 v 80 h -80 Z M 25 25 h 50 v 50 h -50\")");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Shapes Module Level 1: parsing the path() function</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-shapes-1/#funcdef-basic-shape-path">
|
||||
<meta name="assert" content="Tests parsing of the path() function">
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script src="../../../css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_invalid_value("clip-path", "path(evenodd, 'not-a-path')");
|
||||
test_invalid_value("clip-path", "path(badfillrule, 'M10,10')");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Shapes Module Level 1: parsing the path() function</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-shapes-1/#funcdef-basic-shape-path">
|
||||
<meta name="assert" content="Tests parsing of the path() function">
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script src="../../../css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_valid_value("clip-path", "path(evenodd, 'M10,10h80v80h-80zM25,25h50v50h-50z')", "path(evenodd, \"M 10 10 h 80 v 80 h -80 Z M 25 25 h 50 v 50 h -50 Z\")");
|
||||
test_valid_value("clip-path", "path(evenodd, 'M10,10h80v80h-80zM25,25h50v50h-50')", "path(evenodd, \"M 10 10 h 80 v 80 h -80 Z M 25 25 h 50 v 50 h -50\")");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user