mirror of
https://github.com/servo/servo.git
synced 2025-08-11 00:15:32 +01:00
Update web-platform-tests to revision d7afcb8708eac08a614d161d5622a48172daf7e3
This commit is contained in:
parent
6f8bb4dd40
commit
edff458e23
791 changed files with 17647 additions and 10322 deletions
|
@ -0,0 +1,47 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta charset="utf-8">
|
||||
<title>min-width: Should apply to buttons</title>
|
||||
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
|
||||
<link rel="help" href="https://www.w3.org/TR/CSS2/visudet.html#min-max-widths">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
.button-row {
|
||||
background-color: #BBB;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 400px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
button {
|
||||
flex: 0 0 auto;
|
||||
margin: 0px;
|
||||
}
|
||||
</style>
|
||||
<div>
|
||||
<p>Expected: All buttons should be 200px wide</p>
|
||||
</div>
|
||||
<div class="button-row">
|
||||
<button style="min-width: 200px">Foo</button>
|
||||
<button style="min-width: 200px">Bar</button>
|
||||
</div>
|
||||
<div class="button-row">
|
||||
<button style="min-width: 50%">Foo</button>
|
||||
<button style="min-width: 50%">Bar</button>
|
||||
</div>
|
||||
<div class="button-row" style="writing-mode: vertical-rl; height: 100px;flex-direction:column">
|
||||
<button style="min-width: 200px">Foo</button>
|
||||
<button style="min-width: 200px">Bar</button>
|
||||
</div>
|
||||
<div class="button-row" style="zoom:2">
|
||||
<button style="min-width: 200px">Foo</button>
|
||||
<button style="min-width: 200px">Bar</button>
|
||||
</div>
|
||||
<script>
|
||||
test(() => {
|
||||
let buttons = document.querySelectorAll("button");
|
||||
for (let button of document.querySelectorAll("button"))
|
||||
assert_equals(button.offsetWidth, 200);
|
||||
}, 'min-width should force all buttons to be 200px wide');
|
||||
</script>
|
32
tests/wpt/web-platform-tests/css/css-sizing/inheritance.html
Normal file
32
tests/wpt/web-platform-tests/css/css-sizing/inheritance.html
Normal file
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Inheritance of CSS Intrinsic & Extrinsic Sizing properties</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#property-index">
|
||||
<meta name="assert" content="Properties do not inherit.">
|
||||
<meta name="assert" content="Properties have initial values according to the spec.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/inheritance-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="target"></div>
|
||||
</div>
|
||||
<style>
|
||||
#container {
|
||||
display: grid;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
assert_not_inherited('box-sizing', 'content-box', 'border-box');
|
||||
assert_not_inherited('max-height', 'none', '10px');
|
||||
assert_not_inherited('max-width', 'none', '10px');
|
||||
assert_not_inherited('min-height', 'auto', '10px');
|
||||
assert_not_inherited('min-width', 'auto', '10px');
|
||||
|
||||
// height, width not yet tested.
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Intrinsic & Extrinsic Sizing: getComputedValue().boxSizing</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-box-sizing">
|
||||
<meta name="assert" content="box-sizing computed value is 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>
|
||||
test_computed_value("box-sizing", "content-box");
|
||||
test_computed_value("box-sizing", "border-box");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Intrinsic & Extrinsic Sizing Test: parsing box-sizing with invalid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-box-sizing">
|
||||
<meta name="assert" content="box-sizing supports only the grammar 'content-box | border-box'.">
|
||||
<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("box-sizing", "margin-box");
|
||||
test_invalid_value("box-sizing", "padding-box");
|
||||
test_invalid_value("box-sizing", "fill-box");
|
||||
test_invalid_value("box-sizing", "stroke-box");
|
||||
test_invalid_value("box-sizing", "view-box");
|
||||
|
||||
test_invalid_value("box-sizing", "content-box border-box");
|
||||
test_invalid_value("box-sizing", "content-box, border-box");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Intrinsic & Extrinsic Sizing Test: parsing box-sizing with valid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-box-sizing">
|
||||
<meta name="assert" content="box-sizing supports the full grammar 'content-box | border-box'.">
|
||||
<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("box-sizing", "content-box");
|
||||
test_valid_value("box-sizing", "border-box");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Intrinsic & Extrinsic Sizing Test: parsing height with invalid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-height">
|
||||
<meta name="assert" content="height supports only the grammar 'auto | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)'.">
|
||||
<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("height", "none");
|
||||
test_invalid_value("height", "min-content max-content");
|
||||
|
||||
test_invalid_value("height", "-10%");
|
||||
test_invalid_value("height", "-0.5em");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Intrinsic & Extrinsic Sizing Test: parsing height with valid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-height">
|
||||
<meta name="assert" content="height supports the full grammar 'auto | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)'.">
|
||||
<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("height", "auto");
|
||||
test_valid_value("height", "min-content");
|
||||
test_valid_value("height", "max-content");
|
||||
|
||||
test_valid_value("height", "0", "0px");
|
||||
test_valid_value("height", "10%");
|
||||
test_valid_value("height", "0.5em");
|
||||
test_valid_value("height", "calc(10% - 0.5em)");
|
||||
|
||||
test_valid_value("height", "fit-content(10%)");
|
||||
test_valid_value("height", "fit-content(0.5em)");
|
||||
test_valid_value("height", "fit-content(10% - 0.5em)");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Intrinsic & Extrinsic Sizing Test: parsing max-height with invalid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-max-height">
|
||||
<meta name="assert" content="max-height supports only the grammar 'none | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)'.">
|
||||
<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("max-height", "auto");
|
||||
test_invalid_value("max-height", "min-content max-content");
|
||||
|
||||
test_invalid_value("max-height", "-10%");
|
||||
test_invalid_value("max-height", "-0.5em");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Intrinsic & Extrinsic Sizing Test: parsing max-height with valid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-max-height">
|
||||
<meta name="assert" content="max-height supports the full grammar 'none | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)'.">
|
||||
<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("max-height", "none");
|
||||
test_valid_value("max-height", "min-content");
|
||||
test_valid_value("max-height", "max-content");
|
||||
|
||||
test_valid_value("max-height", "0", "0px");
|
||||
test_valid_value("max-height", "10%");
|
||||
test_valid_value("max-height", "0.5em");
|
||||
test_valid_value("max-height", "calc(10% - 0.5em)");
|
||||
|
||||
test_valid_value("max-height", "fit-content(10%)");
|
||||
test_valid_value("max-height", "fit-content(0.5em)");
|
||||
test_valid_value("max-height", "fit-content(10% - 0.5em)");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Intrinsic & Extrinsic Sizing Test: parsing max-width with invalid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-max-width">
|
||||
<meta name="assert" content="max-width supports only the grammar 'none | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)'.">
|
||||
<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("max-width", "auto");
|
||||
test_invalid_value("max-width", "min-content max-content");
|
||||
|
||||
test_invalid_value("max-width", "-10%");
|
||||
test_invalid_value("max-width", "-0.5em");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Intrinsic & Extrinsic Sizing Test: parsing max-width with valid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-max-width">
|
||||
<meta name="assert" content="max-width supports the full grammar 'none | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)'.">
|
||||
<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("max-width", "none");
|
||||
test_valid_value("max-width", "min-content");
|
||||
test_valid_value("max-width", "max-content");
|
||||
|
||||
test_valid_value("max-width", "0", "0px");
|
||||
test_valid_value("max-width", "10%");
|
||||
test_valid_value("max-width", "0.5em");
|
||||
test_valid_value("max-width", "calc(10% - 0.5em)");
|
||||
|
||||
test_valid_value("max-width", "fit-content(10%)");
|
||||
test_valid_value("max-width", "fit-content(0.5em)");
|
||||
test_valid_value("max-width", "fit-content(10% - 0.5em)");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Intrinsic & Extrinsic Sizing Test: parsing min-height with invalid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-min-height">
|
||||
<meta name="assert" content="min-height supports only the grammar 'auto | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)'.">
|
||||
<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("min-height", "none");
|
||||
test_invalid_value("min-height", "min-content max-content");
|
||||
|
||||
test_invalid_value("min-height", "-10%");
|
||||
test_invalid_value("min-height", "-0.5em");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Intrinsic & Extrinsic Sizing Test: parsing min-height with valid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-min-height">
|
||||
<meta name="assert" content="min-height supports the full grammar 'auto | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)'.">
|
||||
<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("min-height", "auto");
|
||||
test_valid_value("min-height", "min-content");
|
||||
test_valid_value("min-height", "max-content");
|
||||
|
||||
test_valid_value("min-height", "0", "0px");
|
||||
test_valid_value("min-height", "10%");
|
||||
test_valid_value("min-height", "0.5em");
|
||||
test_valid_value("min-height", "calc(10% - 0.5em)");
|
||||
|
||||
test_valid_value("min-height", "fit-content(10%)");
|
||||
test_valid_value("min-height", "fit-content(0.5em)");
|
||||
test_valid_value("min-height", "fit-content(10% - 0.5em)");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Intrinsic & Extrinsic Sizing Test: parsing min-width with invalid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-min-width">
|
||||
<meta name="assert" content="min-width supports only the grammar 'auto | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)'.">
|
||||
<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("min-width", "none");
|
||||
test_invalid_value("min-width", "min-content max-content");
|
||||
|
||||
test_invalid_value("min-width", "-10%");
|
||||
test_invalid_value("min-width", "-0.5em");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Intrinsic & Extrinsic Sizing Test: parsing min-width with valid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-min-width">
|
||||
<meta name="assert" content="min-width supports the full grammar 'auto | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)'.">
|
||||
<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("min-width", "auto");
|
||||
test_valid_value("min-width", "min-content");
|
||||
test_valid_value("min-width", "max-content");
|
||||
|
||||
test_valid_value("min-width", "0", "0px");
|
||||
test_valid_value("min-width", "10%");
|
||||
test_valid_value("min-width", "0.5em");
|
||||
test_valid_value("min-width", "calc(10% - 0.5em)");
|
||||
|
||||
test_valid_value("min-width", "fit-content(10%)");
|
||||
test_valid_value("min-width", "fit-content(0.5em)");
|
||||
test_valid_value("min-width", "fit-content(10% - 0.5em)");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Intrinsic & Extrinsic Sizing Test: parsing width with invalid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-width">
|
||||
<meta name="assert" content="width supports only the grammar 'auto | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)'.">
|
||||
<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("width", "none");
|
||||
test_invalid_value("width", "min-content max-content");
|
||||
|
||||
test_invalid_value("width", "-10%");
|
||||
test_invalid_value("width", "-0.5em");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Intrinsic & Extrinsic Sizing Test: parsing width with valid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-width">
|
||||
<meta name="assert" content="width supports the full grammar 'auto | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)'.">
|
||||
<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("width", "auto");
|
||||
test_valid_value("width", "min-content");
|
||||
test_valid_value("width", "max-content");
|
||||
|
||||
test_valid_value("width", "0", "0px");
|
||||
test_valid_value("width", "10%");
|
||||
test_valid_value("width", "0.5em");
|
||||
test_valid_value("width", "calc(10% - 0.5em)");
|
||||
|
||||
test_valid_value("width", "fit-content(10%)");
|
||||
test_valid_value("width", "fit-content(0.5em)");
|
||||
test_valid_value("width", "fit-content(10% - 0.5em)");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue