Automatic update from web-platform-tests [grid-lanes] Make tests not depend on inline-grid-lanes alias https://github.com/w3c/csswg-drafts/issues/10961 This commit does three things: * Makes layout tests use 'inline grid-lanes' which will be valid in any case. * Ensures parsing tests for both 'inline grid-lanes' and 'inline-grid-lanes', that check for correct behaior in implementations that support the alias as well as those that don't. At least one of these tests will fail in each implementation, to remind us to revisit once the CSSWG settles this issue. * Adds parsing tests for 'block grid-lanes' while we're at it. -- wpt-commits: 2ecae7137d455fc7f7b3c77fc19e1ca81d598218 wpt-pr: 57972
47 lines
1.7 KiB
HTML
47 lines
1.7 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>CSS Display: getComputedStyle().display</title>
|
|
<link rel="author" title="Ethan Jimenez" href="mailto:ethavar@microsoft.com">
|
|
<link rel="help" href="https://www.w3.org/TR/css-grid-3/#grid-lanes-containers">
|
|
<meta name="assert" content="position and float can change display computed value.">
|
|
<meta name="assert" content="display computed value is otherwise as specified.">
|
|
<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>
|
|
'use strict';
|
|
|
|
// https://www.w3.org/TR/css-grid-3/#grid-lanes-containers
|
|
test_computed_value("display", "grid-lanes");
|
|
test_computed_value("display", "block grid-lanes", "grid-lanes");
|
|
test_computed_value("display", "grid-lanes block", "grid-lanes");
|
|
test_computed_value("display", "inline-grid-lanes");
|
|
test_computed_value("display", "inline grid-lanes");
|
|
test_computed_value("display", "grid-lanes inline", "inline grid-lanes");
|
|
|
|
// https://www.w3.org/TR/CSS2/visuren.html#dis-pos-flo
|
|
function test_display_affected(property, value) {
|
|
const target = document.getElementById('target');
|
|
test(() => {
|
|
target.style[property] = value;
|
|
target.style.display = 'inline grid-lanes';
|
|
assert_equals(getComputedStyle(target).display, 'grid-lanes', 'inline grid-lanes -> grid-lanes');
|
|
|
|
target.style[property] = '';
|
|
target.style.display = '';
|
|
}, property + ' ' + value + ' affects computed display');
|
|
}
|
|
|
|
test_display_affected("position", "absolute");
|
|
test_display_affected("position", "fixed");
|
|
test_display_affected("float", "left");
|
|
test_display_affected("float", "right");
|
|
</script>
|
|
</body>
|
|
</html>
|