mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 04:52:06 +02:00
Tests: Synchronize imported tests with the WPT repository
This commit is contained in:
committed by
Alexander Kalenik
parent
11e5cd5048
commit
689dff3ee8
Notes:
github-actions[bot]
2025-06-22 21:52:43 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/689dff3ee85 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5160
@@ -16,6 +16,8 @@ test_invalid_value("flex", "none 1");
|
||||
test_invalid_value("flex", "2 3 4");
|
||||
test_invalid_value("flex", "5px 7%");
|
||||
test_invalid_value("flex", "9 none");
|
||||
test_invalid_value("flex", "1 2 calc(0)");
|
||||
test_invalid_value("flex", "1 2 calc(3 - 3)");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -8,16 +8,38 @@
|
||||
<meta name="assert" content="flex supports the full grammar 'none | [ <‘flex-grow’> <‘flex-shrink’>? || <‘flex-basis’> ]'.">
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script src="../../support/parsing-testcommon.js"></script>
|
||||
<script src="../../../css/support/parsing-testcommon.js"></script>
|
||||
<style>
|
||||
#container {
|
||||
container-type: inline-size;
|
||||
width: 10px;
|
||||
}
|
||||
#target {
|
||||
font-size: 40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="target"></div>
|
||||
</div>
|
||||
<script>
|
||||
test_valid_value("flex", "none", "0 0 auto");
|
||||
test_valid_value("flex", "1", "1 1 0%");
|
||||
test_valid_value("flex", "2 3", "2 3 0%");
|
||||
test_valid_value("flex", "4 5 6px");
|
||||
test_valid_value("flex", "6px 4 5", "4 5 6px");
|
||||
test_valid_value("flex", "6px 4", "4 1 6px");
|
||||
test_valid_value("flex", "6px", "1 1 6px");
|
||||
test_valid_value("flex", "7% 8", "8 1 7%");
|
||||
test_valid_value("flex", "8 auto", "8 1 auto");
|
||||
test_valid_value("flex", "1 1 10em", "1 1 10em");
|
||||
test_valid_value("flex", "1 1 calc(10em)", "1 1 calc(10em)");
|
||||
test_valid_value("flex", "1 1 calc(-10em)", "1 1 calc(-10em)");
|
||||
test_valid_value("flex", "calc(10 + (sign(20cqw - 10px) * 5)) calc(10 + (sign(20cqw - 10px) * 5)) 1px", "calc(10 + (5 * sign(20cqw - 10px))) calc(10 + (5 * sign(20cqw - 10px))) 1px");
|
||||
test_valid_value("flex", "1 1 calc(10px + (sign(20cqw - 10px) * 5px))", "1 1 calc(10px + (5px * sign(20cqw - 10px)))");
|
||||
test_valid_value("flex", "calc(1) calc(2 + 1) calc(3px)", "calc(1) calc(3) calc(3px)");
|
||||
test_valid_value("flex", "calc(-1) calc(-1) 0", "calc(-1) calc(-1) 0px");
|
||||
|
||||
// The following is not yet supported by browsers:
|
||||
// test_valid_value("flex", "content");
|
||||
|
||||
Reference in New Issue
Block a user