forked from mykmelez/gecko
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1555686 [wpt PR 17099] - CSS: Test computed Logical Height/Width …
…limits, a=testonly Automatic update from web-platform-tests CSS: Test computed Logical Height/Width limits Web Platform Tests for the computed values of the min-block-size/min-inline-size, and max-block-size/max-inline-size properties. https://drafts.csswg.org/css-logical/#dimension-properties Change-Id: I8377da7f48575a64365af26ed6467411a63eac0b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1637004 Commit-Queue: Eric Willigers <ericwilligers@chromium.org> Auto-Submit: Eric Willigers <ericwilligers@chromium.org> Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org> Cr-Commit-Position: refs/heads/master@{#666610} -- wp5At-commits: 1619024d955c79fd7bf4f1093a904297dba04752 wpt-pr: 17099
- Loading branch information
1 parent
d075414
commit 8eef046
Showing
4 changed files
with
158 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
testing/web-platform/tests/css/css-logical/parsing/max-block-size-computed.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>CSS Logical Properties and Values: getComputedValue().maxBlockSize</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-logical/#propdef-max-block-size"> | ||
<meta name="assert" content="Computed max-block-size is the specified keyword, or the length-percentage made absolute."> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/css/support/computed-testcommon.js"></script> | ||
<style> | ||
#target { | ||
font-size: 40px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="target"></div> | ||
<script> | ||
test_computed_value("max-block-size", "none"); | ||
|
||
test_computed_value("max-block-size", "10px"); | ||
test_computed_value("max-block-size", "20%"); | ||
test_computed_value("max-block-size", "calc(10px + 0.5em)", "30px"); | ||
test_computed_value("max-block-size", "calc(10px - 0.5em)", "0px"); | ||
test_computed_value("max-block-size", "calc(20% + 10px)"); | ||
|
||
test_computed_value("max-block-size", "min-content"); | ||
test_computed_value("max-block-size", "max-content"); | ||
</script> | ||
</body> | ||
</html> |
32 changes: 32 additions & 0 deletions
32
testing/web-platform/tests/css/css-logical/parsing/max-inline-size-computed.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>CSS Logical Properties and Values: getComputedValue().maxInlineSize</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-logical/#propdef-max-inline-size"> | ||
<meta name="assert" content="Computed max-inline-size is the specified keyword, or the length-percentage made absolute."> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/css/support/computed-testcommon.js"></script> | ||
<style> | ||
#target { | ||
font-size: 40px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="target"></div> | ||
<script> | ||
test_computed_value("max-inline-size", "none"); | ||
|
||
test_computed_value("max-inline-size", "10px"); | ||
test_computed_value("max-inline-size", "20%"); | ||
test_computed_value("max-inline-size", "calc(10px + 0.5em)", "30px"); | ||
test_computed_value("max-inline-size", "calc(10px - 0.5em)", "0px"); | ||
test_computed_value("max-inline-size", "calc(20% + 10px)"); | ||
|
||
test_computed_value("max-inline-size", "min-content"); | ||
test_computed_value("max-inline-size", "max-content"); | ||
</script> | ||
</body> | ||
</html> |
47 changes: 47 additions & 0 deletions
47
testing/web-platform/tests/css/css-logical/parsing/min-block-size-computed.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>CSS Logical Properties and Values: getComputedValue().minBlockSize</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-logical/#propdef-min-block-size"> | ||
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#min-size-auto"> | ||
<meta name="assert" content="Computed min-block-size is the specified keyword, or the length-percentage made absolute."> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/css/support/computed-testcommon.js"></script> | ||
<style> | ||
#target { | ||
font-size: 40px; | ||
} | ||
#container { | ||
display: flex; | ||
} | ||
#box { | ||
min-block-size: auto; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="target"></div> | ||
<div id="container"> | ||
<div id="box"></div> | ||
</div> | ||
<script> | ||
test_computed_value("min-block-size", "auto", "0px"); | ||
|
||
test_computed_value("min-block-size", "10px"); | ||
test_computed_value("min-block-size", "20%"); | ||
test_computed_value("min-block-size", "calc(10px + 0.5em)", "30px"); | ||
test_computed_value("min-block-size", "calc(10px - 0.5em)", "0px"); | ||
test_computed_value("min-block-size", "calc(20% + 10px)"); | ||
|
||
test_computed_value("min-block-size", "min-content"); | ||
test_computed_value("min-block-size", "max-content"); | ||
|
||
test(() => { | ||
const picture = document.getElementById('box'); | ||
assert_equals(getComputedStyle(picture).minBlockSize, 'auto'); | ||
}, 'min-block-size auto computes to auto with flex layout.'); | ||
</script> | ||
</body> | ||
</html> |
47 changes: 47 additions & 0 deletions
47
testing/web-platform/tests/css/css-logical/parsing/min-inline-size-computed.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>CSS Logical Properties and Values: getComputedValue().minInlineSize</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-logical/#propdef-min-inline-size"> | ||
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#min-size-auto"> | ||
<meta name="assert" content="Computed min-inline-size is the specified keyword, or the length-percentage made absolute."> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/css/support/computed-testcommon.js"></script> | ||
<style> | ||
#target { | ||
font-size: 40px; | ||
} | ||
#container { | ||
display: flex; | ||
} | ||
#box { | ||
min-inline-size: auto; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="target"></div> | ||
<div id="container"> | ||
<div id="box"></div> | ||
</div> | ||
<script> | ||
test_computed_value("min-inline-size", "auto", "0px"); | ||
|
||
test_computed_value("min-inline-size", "10px"); | ||
test_computed_value("min-inline-size", "20%"); | ||
test_computed_value("min-inline-size", "calc(10px + 0.5em)", "30px"); | ||
test_computed_value("min-inline-size", "calc(10px - 0.5em)", "0px"); | ||
test_computed_value("min-inline-size", "calc(20% + 10px)"); | ||
|
||
test_computed_value("min-inline-size", "min-content"); | ||
test_computed_value("min-inline-size", "max-content"); | ||
|
||
test(() => { | ||
const picture = document.getElementById('box'); | ||
assert_equals(getComputedStyle(picture).minInlineSize, 'auto'); | ||
}, 'min-inline-size auto computes to auto with flex layout.'); | ||
</script> | ||
</body> | ||
</html> |