Update web-platform-tests to revision d7afcb8708eac08a614d161d5622a48172daf7e3

This commit is contained in:
WPT Sync Bot 2019-05-15 10:40:54 -04:00 committed by Josh Matthews
parent 6f8bb4dd40
commit edff458e23
791 changed files with 17647 additions and 10322 deletions

View file

@ -17,8 +17,19 @@
</style>
<div id="target"></div>
<script>
// TODO: Add inset() tests
test_computed_value("shape-outside", "circle(at 10% 20%)");
test_computed_value("shape-outside", "circle(calc(10px + 0.5em) at -50% 50%) border-box", "circle(30px at -50% 50%) border-box");
test_computed_value("shape-outside", "circle(calc(10px - 0.5em) at 50% -50%) border-box", "circle(0px at 50% -50%) border-box");
test_computed_value("shape-outside", "ellipse(60% closest-side at 50% 50%)");
test_computed_value("shape-outside", "ellipse(calc(10px + 0.5em) calc(10px - 0.5em) at -50% 50%) padding-box", "ellipse(30px 0px at -50% 50%) padding-box");
test_computed_value("shape-outside", "ellipse(calc(10px - 0.5em) calc(10px + 0.5em) at 50% -50%) border-box", "ellipse(0px 30px at 50% -50%) border-box");
test_computed_value("polygon(evenodd, -10px, -20px, -30px, -40px, -50px, -60px) margin-box");
test_computed_value("polygon(10%, 20%, 30%, 40%, 50%, 60%) content-box");
test_computed_value("polygon(calc(10px - 0.5em), 20%, 30%, 40%, 50%, calc(10px - 0.5em))", "polygon(-10px, 20%, 30%, 40%, 50%, -10px)");
</script>
</body>
</html>

View file

@ -37,11 +37,15 @@ test_invalid_value("shape-outside", "ellipse(farthest-side at)");
test_invalid_value("shape-outside", "ellipse(1% 2% top right)");
test_invalid_value("shape-outside", "ellipse(3%)");
test_invalid_value("shape-outside", "ellipse(3% at 100% 0%)");
test_invalid_value("shape-outside", "ellipse(closest-side)");
test_invalid_value("shape-outside", "ellipse(farthest-side at 100% 0%)");
test_invalid_value("shape-outside", "ellipse(10% -20% at 30% 40%)");
test_invalid_value("shape-outside", "ellipse(-50px 60px at 70% 80%)");
test_invalid_value("shape-outside", "polygon(1%)");
test_invalid_value("shape-outside", "border-box circle(7% at 8% 9%) border-box");
// <geometry-box> other than <shape-box>
test_invalid_value("shape-outside", "fill-box");
test_invalid_value("shape-outside", "stroke-box");

View file

@ -35,6 +35,8 @@ test_valid_value("shape-outside", "circle(4% at top right)", "circle(4% at 100%
test_valid_value("shape-outside", "ellipse()", "ellipse(at 50% 50%)");
test_valid_value("shape-outside", "ellipse(3% 2%)", "ellipse(3% 2% at 50% 50%)");
test_valid_value("shape-outside", "ellipse(closest-side 1px)", "ellipse(closest-side 1px at 50% 50%)");
test_valid_value("shape-outside", "ellipse(10% closest-side)", "ellipse(10% closest-side at 50% 50%)");
test_valid_value("shape-outside", "ellipse(closest-side closest-side at 60% 70%)", "ellipse(at 60% 70%)");
test_valid_value("shape-outside", "ellipse(at 10% 20%)");
test_valid_value("shape-outside", "ellipse(farthest-side 4% at bottom left)", "ellipse(farthest-side 4% at 0% 100%)");
@ -51,8 +53,11 @@ test_valid_value("shape-outside", "margin-box");
// basic-shape> <shape-box>
test_valid_value("shape-outside", "circle(7% at 8% 9%) border-box");
// <shape-box> basic-shape>
test_valid_value("shape-outside", "border-box circle(7% at 8% 9%)");
// <shape-box> <basic-shape>
test_valid_value("shape-outside", "padding-box inset(10em)", "inset(10em) padding-box");
test_valid_value("shape-outside", "border-box circle(7% at 8% 9%)", "circle(7% at 8% 9%) border-box");
test_valid_value("shape-outside", "margin-box ellipse(at 1em 2em)", "ellipse(at 1em 2em) margin-box");
test_valid_value("shape-outside", "content-box polygon(1% 2%)", "polygon(1% 2%) content-box");
// <image>
// Spec is silent about url serialization.

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<link rel="match" href="../../../../reference/ref-filled-green-100px-square-only.html">
<link rel="help" href="https://crbug.com/962135" />
<meta name="assert" content="This test passes if the renderer does not crash."/>
<p>Test passes if there is a filled green square.</p>
<div style="width: 100px; height: 100px; display: flow-root; background: green;">
<div style="width: 20px; height: 20px; float: right;"></div>
<div style="width: 20px; height: 10px; display: inline-block;"></div>
<div style="width: 40px; height: 20px; overflow: hidden;"></div>
<div style="width: 20px; height: 10px; display: inline-block;"></div>
<div style="width: 50px; height: 50px; float: left; shape-outside: inset(20px 0 0 0);"></div>
<div id="target" style="height: 50px; margin: 10px 0;"></div>
<div style="width: 20px; height: 10px; display: inline-block;"></div>
</div>
<script>
document.body.offsetTop;
document.getElementById('target').style.height = '10px';
document.body.offsetTop;
</script>

View file

@ -19,19 +19,6 @@
<script type="text/javascript">
var ellipse_calc_tests = [];
var defaultPosition = ' at 50% 50%';
ParsingUtils.calcTestValues.forEach(function(value) {
testCase = ['ellipse('+ value[0] +')',
'ellipse('+ value[1] + defaultPosition +')'];
if(Object.prototype.toString.call( value[2] ) === '[object Array]' && value[2].length == 2) {
testCase.push([
'ellipse('+ value[2][0] + defaultPosition +')',
'ellipse('+ value[2][1] + defaultPosition +')',
]);
} else {
testCase.push('ellipse('+ value[2] + defaultPosition +')');
}
ellipse_calc_tests.push(testCase);
});
ParsingUtils.calcTestValues.forEach(function(value) {
testCase = ['ellipse(farthest-side '+ value[0] +')',
'ellipse(farthest-side '+ value[1] + defaultPosition +')'];

View file

@ -31,19 +31,6 @@
}
ellipse_position_calc_tests.push(testCase);
});
ParsingUtils.calcTestValues.forEach(function(value) {
testCase = ['ellipse(farthest-side at '+ value[0] +' 50%)',
'ellipse(farthest-side at '+ value[1] +' 50%)'];
if(Object.prototype.toString.call( value[2] ) === '[object Array]' && value[2].length == 2) {
testCase.push([
'ellipse(farthest-side at '+ value[2][0] +' 50%)',
'ellipse(farthest-side at '+ value[2][1] +' 50%)'
]);
} else {
testCase.push('ellipse(farthest-side at '+ value[2] +' 50%)');
}
ellipse_position_calc_tests.push(testCase);
});
ParsingUtils.calcTestValues.forEach(function(value) {
testCase = ['ellipse(closest-side farthest-side at '+ value[0] +' '+ value[0] +')',
'ellipse(closest-side farthest-side at '+ value[1] +' '+ value[1] +')'];

View file

@ -39,22 +39,22 @@
},
{
"actual": " content-box polygon(nonzero, 1px 1px)",
"expected_inline": "content-box polygon(1px 1px)",
"expected_inline": "polygon(1px 1px) content-box",
"expected_computed": "polygon(1px 1px) content-box"
},
{
"actual": "padding-box polygon(nonzero, 1px 1px)",
"expected_inline": "padding-box polygon(1px 1px)",
"expected_inline": "polygon(1px 1px) padding-box",
"expected_computed": "polygon(1px 1px) padding-box"
},
{
"actual": "border-box polygon(nonzero, 1px 1px)",
"expected_inline": "border-box polygon(1px 1px)",
"expected_inline": "polygon(1px 1px) border-box",
"expected_computed": "polygon(1px 1px) border-box"
},
{
"actual": "margin-box polygon(nonzero, 1px 1px)",
"expected_inline": "margin-box polygon(1px 1px)",
"expected_inline": "polygon(1px 1px) margin-box",
"expected_computed": "polygon(1px 1px) margin-box"
}
];

View file

@ -735,17 +735,13 @@ var validCircleRadii = [
]
var validEllipseRadii = [
['', 'at 50% 50%', 'at 50% 50%'],
['50u1', '50u1 at 50% 50%', '50u1 at 50% 50%'],
['50%', '50% at 50% 50%', '50% at 50% 50%'],
['closest-side', 'at 50% 50%', 'at 50% 50%'],
['farthest-side', 'farthest-side at 50% 50%', 'farthest-side at 50% 50%'],
['50u1 100u1', '50u1 100u1 at 50% 50%'],
['100u1 100px', '100u1 100px at 50% 50%'],
['25% 50%', '25% 50% at 50% 50%'],
['50u1 25%', '50u1 25% at 50% 50%'],
['25% 50u1', '25% 50u1 at 50% 50%'],
['25% closest-side', '25% at 50% 50%'],
['25u1 closest-side', '25u1 at 50% 50%'],
['25% closest-side', '25% closest-side at 50% 50%'],
['25u1 closest-side', '25u1 closest-side at 50% 50%'],
['closest-side 75%', 'closest-side 75% at 50% 50%'],
['closest-side 75u1', 'closest-side 75u1 at 50% 50%'],
['25% farthest-side', '25% farthest-side at 50% 50%'],
@ -755,7 +751,7 @@ var validEllipseRadii = [
['closest-side closest-side', 'at 50% 50%'],
['farthest-side farthest-side', 'farthest-side farthest-side at 50% 50%'],
['closest-side farthest-side', 'closest-side farthest-side at 50% 50%'],
['farthest-side closest-side', 'farthest-side at 50% 50%']
['farthest-side closest-side', 'farthest-side closest-side at 50% 50%']
]
var validInsets = [